diff --git a/.dev/docker/cmake_ctest.dockerfile b/.dev/docker/cmake_ctest.dockerfile index ef5a395d..4832171e 100644 --- a/.dev/docker/cmake_ctest.dockerfile +++ b/.dev/docker/cmake_ctest.dockerfile @@ -6,7 +6,7 @@ RUN mkdir /app COPY ./cbflib /app/cbflib RUN apt-get update && \ - apt-get install -y build-essential git cmake default-jdk gfortran links m4 python3-dev python3-numpy-dev swig + apt-get install -y bison build-essential git cmake default-jdk gfortran links m4 python3-dev python3-numpy-dev swig RUN cd /app/cbflib && \ cmake . && \ diff --git a/.dev/docker/make_tests.dockerfile b/.dev/docker/make_tests.dockerfile index 0fad6a6c..ea0530e7 100644 --- a/.dev/docker/make_tests.dockerfile +++ b/.dev/docker/make_tests.dockerfile @@ -6,7 +6,7 @@ RUN mkdir /app COPY ./cbflib /app/cbflib RUN apt-get update && \ - apt-get install -y bison build-essential git wget libjpeg-dev m4 automake libpcre2-dev liblzma-dev python3-build python3-dev python3-numpy-dev python3-setuptools python3-venv rsync gfortran libz-dev + apt-get install -y bison build-essential git wget libjpeg-dev m4 automake libpcre2-dev liblzma-dev links python3-build python3-dev python3-numpy-dev python3-setuptools python3-venv rsync gfortran libz-dev RUN cd /app/cbflib && \ make all diff --git a/.github/workflows/cmake_ctest.yml b/.github/workflows/cmake_ctest.yml index a9c18b28..eb5b0696 100644 --- a/.github/workflows/cmake_ctest.yml +++ b/.github/workflows/cmake_ctest.yml @@ -21,7 +21,7 @@ jobs: - name: Install extra dependencies run: | sudo apt-get update - sudo apt-get install -y python3-numpy-dev + sudo apt-get install -y links python3-numpy-dev - name: Build run: | cmake . diff --git a/.github/workflows/make_tests.yml b/.github/workflows/make_tests.yml index 3211514e..872889e1 100644 --- a/.github/workflows/make_tests.yml +++ b/.github/workflows/make_tests.yml @@ -21,7 +21,7 @@ jobs: - name: Install extra dependencies run: | sudo apt-get update - sudo apt-get install -y libjpeg-dev liblzma-dev python3-build python3-dev python3-numpy-dev + sudo apt-get install -y libjpeg-dev liblzma-dev links python3-build python3-dev python3-numpy-dev - name: Build run: | make all diff --git a/CMakeLists.txt b/CMakeLists.txt index 37f964f3..7e40f2b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,6 +308,7 @@ if(CBF_ENABLE_FORTRAN) endif() endif() +option(CBF_ENABLE_DOC "Build documentation" OFF) option(CBF_ENABLE_ULP "Enable ULP" OFF) set (CBF_CMAKE_DEBUG "ON") @@ -671,8 +672,15 @@ endif() # # Source files # +# Since Bison 2.7 (2012-12-12), use of "%define api.pure full" is +# strongly encouraged. +find_package(BISON 2.7 REQUIRED) +bison_target(cbf_stx "${CBF__SRC}/cbf.stx.y" "cbf_stx.c" + DEFINES_FILE "cbf_stx.h") + set( CBF_C_SOURCES + "${BISON_cbf_stx_OUTPUTS}" ${CBF__SRC}/cbf.c "${CBF__SRC}/cbf_airy_disk.c" ${CBF__SRC}/cbf_alloc.c @@ -698,7 +706,6 @@ set( ${CBF__SRC}/cbf_read_mime.c ${CBF__SRC}/cbf_simple.c ${CBF__SRC}/cbf_string.c - ${CBF__SRC}/cbf_stx.c ${CBF__SRC}/cbf_tree.c ${CBF__SRC}/cbf_uncompressed.c ${CBF__SRC}/cbf_write.c @@ -759,7 +766,6 @@ set( ${CBF__INCLUDE}/cbf_read_mime.h ${CBF__INCLUDE}/cbf_simple.h ${CBF__INCLUDE}/cbf_string.h - ${CBF__INCLUDE}/cbf_stx.h ${CBF__INCLUDE}/cbf_tree.h ${CBF__INCLUDE}/cbf_uncompressed.h ${CBF__INCLUDE}/cbf_write.h @@ -809,11 +815,6 @@ set( CACHE STRING "" ) -# Set up the necessary includes - -include_directories(BEFORE SYSTEM - ${CBFlib_SOURCE_DIR}/include) - # # Build the static and shared CBF libraries @@ -835,6 +836,11 @@ endif() set_target_properties(cbf PROPERTIES OUTPUT_NAME "cbf") set_target_properties(cbf PROPERTIES LINKER_LANGUAGE C) set_target_properties(cbf PROPERTIES SOVERSION "${SOVERSION}") +target_include_directories(cbf + PUBLIC + "$" + "$" + "$") target_link_libraries(cbf PUBLIC hdf5 PRIVATE pcre2-posix @@ -847,6 +853,10 @@ target_link_libraries(cbf add_library(img "${CBF__SRC}/img.c") set_target_properties(img PROPERTIES OUTPUT_NAME "img") set_target_properties(img PROPERTIES LINKER_LANGUAGE C) +target_include_directories(img + PUBLIC + "$" + "$") # @@ -1045,6 +1055,24 @@ if(CBF_ENABLE_PYTHON) TARGETS pycbf COMPONENT "Runtime" DESTINATION "${Python_SITEARCH}") + + if(CBF_ENABLE_DOC) + find_program(PDFLATEX pdflatex REQUIRED) + add_custom_command( + OUTPUT "pycbf.pdf" + COMMAND "${PDFLATEX}" + -interaction batchmode + -output-directory "${CMAKE_CURRENT_BINARY_DIR}" + "pycbf.tex" + COMMAND "${PDFLATEX}" + -interaction batchmode + -output-directory "${CMAKE_CURRENT_BINARY_DIR}" + "pycbf.tex" + MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/pycbf/pycbf.tex" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/pycbf") + add_custom_target(pdf ALL + DEPENDS "pycbf.pdf") + endif() endif() diff --git a/Makefile b/Makefile index 78360e61..b3064e4e 100644 --- a/Makefile +++ b/Makefile @@ -1771,10 +1771,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -1904,18 +1902,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -1939,19 +1933,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -1975,19 +1972,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2011,19 +2004,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/Makefile_LINUX b/Makefile_LINUX index f38264b4..e37bd7ce 100644 --- a/Makefile_LINUX +++ b/Makefile_LINUX @@ -1767,10 +1767,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -1900,18 +1898,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -1935,19 +1929,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -1971,19 +1968,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2007,19 +2000,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/Makefile_MINGW b/Makefile_MINGW index 00ff47f6..c8077eac 100644 --- a/Makefile_MINGW +++ b/Makefile_MINGW @@ -1781,10 +1781,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -1914,18 +1912,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -1949,19 +1943,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -1985,19 +1982,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2021,19 +2014,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/Makefile_MSYS2 b/Makefile_MSYS2 index 6e6d3686..c74930e3 100644 --- a/Makefile_MSYS2 +++ b/Makefile_MSYS2 @@ -1766,10 +1766,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -1899,18 +1897,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -1934,19 +1928,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -1970,19 +1967,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2006,19 +1999,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/Makefile_OSX b/Makefile_OSX index 3ff826cc..7e409373 100644 --- a/Makefile_OSX +++ b/Makefile_OSX @@ -1763,10 +1763,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -1896,18 +1894,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -1931,19 +1925,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -1967,19 +1964,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2003,19 +1996,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/include/cbf_lex.h b/include/cbf_lex.h index 073e74d7..8fc253ab 100644 --- a/include/cbf_lex.h +++ b/include/cbf_lex.h @@ -258,11 +258,18 @@ extern "C" { #include "cbf_tree.h" #include "cbf_file.h" -#include "cbf_stx.h" #include +typedef union _cbf_stype +{ + int errorcode; + const char *text; + cbf_node *node; +} YYSTYPE; + + /* Get the next token */ int cbf_lex (cbf_handle handle, YYSTYPE *val); diff --git a/include/cbf_stx.h b/include/cbf_stx.h deleted file mode 100644 index 35ed1b5a..00000000 --- a/include/cbf_stx.h +++ /dev/null @@ -1,99 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - 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 3 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_YY_SRC_CBF_STX_TAB_H_INCLUDED -# define YY_YY_SRC_CBF_STX_TAB_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - DATA = 258, - DEFINE = 259, - SAVE = 260, - SAVEEND = 261, - LOOP = 262, - ITEM = 263, - CATEGORY = 264, - COLUMN = 265, - STRING = 266, - CBFWORD = 267, - BINARY = 268, - UNKNOWN = 269, - COMMENT = 270, - ERROR = 271 - }; -#endif - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - - - int errorcode; - const char *text; - cbf_node *node; - - - -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void * context); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_YY_SRC_CBF_STX_TAB_H_INCLUDED */ diff --git a/m4/Makefile.m4 b/m4/Makefile.m4 index 322ef522..e05c66da 100644 --- a/m4/Makefile.m4 +++ b/m4/Makefile.m4 @@ -2134,10 +2134,8 @@ $(MINICBF_TESTS): # # 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 +$(INCLUDE)/cbf_stx.h $(SRC)/cbf_stx.c &: $(SRC)/cbf.stx.y + bison -H$(INCLUDE)/cbf_stx.h -o$(SRC)/cbf_stx.c $(SRC)/cbf.stx.y # # CBF library @@ -2267,18 +2265,14 @@ $(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 ) +$(PY2CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) -t pycbf ) $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ $(PY2CBF)/py2setup.py \ - $(PY2CBF)/pycbf.i \ - $(PY2CBF)/cbfhandlewrappers.i \ - $(PY2CBF)/cbfdetectorwrappers.i \ - $(PY2CBF)/cbfgenericwrappers.i \ - $(PY2CBF)/cbfgoniometerwrappers.i + $(PY2CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) _py2cbf.$(PY2CBFEXT)) $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py (cd $(PY2CBF); $(PYTHON2) $(PY2INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2302,19 +2296,22 @@ $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w (cd $(PY2CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf ) $(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 +$(PY2CBF)/cbfdetectorwrappers.i \ +$(PY2CBF)/cbfgenericwrappers.i \ +$(PY2CBF)/cbfgoniometerwrappers.i \ +$(PY2CBF)/cbfhandlewrappers.i \ +$(PY2CBF)/cbfpositionerwrappers.i \ +$(PY2CBF)/pycbf.py \ +$(PY2CBF)/pycbf_wrap.c &: $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py $(PY2CBF)/pycbf.i (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 ) @@ -2338,19 +2335,15 @@ $(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 ) +$(PY3CBF)/xmas/xmas_cif_template.cif &: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) -t pycbf ) $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ $(PY3CBF)/py3setup.py \ - $(PY3CBF)/pycbf.i \ - $(PY3CBF)/cbfhandlewrappers.i \ - $(PY3CBF)/cbfdetectorwrappers.i \ - $(PY3CBF)/cbfgenericwrappers.i \ - $(PY3CBF)/cbfgoniometerwrappers.i + $(PY3CBF)/pycbf_wrap.c -cp $(SOLIB)/*.$(SO_EXT) $(LIB) - (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) _pycbf.$(PY3CBFEXT)) $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py (cd $(PY3CBF); $(PYTHON3) $(PY3INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) @@ -2374,19 +2367,22 @@ $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w (cd $(PY3CBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode pycbf; \ + pdflatex -interaction batchmode pycbf; \ + $(NUWEB) -o pycbf; \ + pdflatex -interaction batchmode 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 +$(PY3CBF)/cbfdetectorwrappers.i \ +$(PY3CBF)/cbfgenericwrappers.i \ +$(PY3CBF)/cbfgoniometerwrappers.i \ +$(PY3CBF)/cbfhandlewrappers.i \ +$(PY3CBF)/cbfpositionerwrappers.i \ +$(PY3CBF)/pycbf.py \ +$(PY3CBF)/pycbf_wrap.c &: $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py $(PY3CBF)/pycbf.i (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) diff --git a/py2cbf/CBFlib.txt b/py2cbf/CBFlib.txt deleted file mode 100644 index 33863350..00000000 --- a/py2cbf/CBFlib.txt +++ /dev/null @@ -1,12209 +0,0 @@ - [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/_pycbf.pyd b/py2cbf/_pycbf.pyd deleted file mode 100644 index a8580cd2..00000000 Binary files a/py2cbf/_pycbf.pyd and /dev/null differ diff --git a/py2cbf/pycbf.aux b/py2cbf/pycbf.aux deleted file mode 100644 index c76b5b37..00000000 --- a/py2cbf/pycbf.aux +++ /dev/null @@ -1,55 +0,0 @@ -\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 deleted file mode 100644 index c5301c8e..00000000 Binary files a/py2cbf/pycbf.dvi and /dev/null differ diff --git a/py2cbf/pycbf.log b/py2cbf/pycbf.log deleted file mode 100644 index 2d6f86f0..00000000 --- a/py2cbf/pycbf.log +++ /dev/null @@ -1,1383 +0,0 @@ -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 deleted file mode 100644 index be00d166..00000000 --- a/py2cbf/pycbf.out +++ /dev/null @@ -1,21 +0,0 @@ -\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 deleted file mode 100644 index adc1bb18..00000000 Binary files a/py2cbf/pycbf.pdf and /dev/null differ diff --git a/py2cbf/pycbf.py b/py2cbf/pycbf.py deleted file mode 100644 index f1b1d5fa..00000000 --- a/py2cbf/pycbf.py +++ /dev/null @@ -1,8980 +0,0 @@ -# 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 _py2cbf: -_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 _py2cbf: -_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 _py2cbf: -_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 _py2cbf: -_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 _py2cbf: -_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 _py2cbf: -_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 _py2cbf: -_py2cbf.cbf_handle_struct_swigregister(cbf_handle_struct) - - - diff --git a/py2cbf/pycbf.tex b/py2cbf/pycbf.tex index 40c38eeb..6ad07722 100644 --- a/py2cbf/pycbf.tex +++ b/py2cbf/pycbf.tex @@ -4716,7 +4716,7 @@ \subsection{Test cases for the generics} \end{list} \end{minipage}\vspace{4ex} \end{flushleft} -\subsection{Version of pycbf_test1 with write logic added} +\subsection{Version of pycbf\_test1 with write logic added} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap16}\raggedright\small diff --git a/py2cbf/pycbf.toc b/py2cbf/pycbf.toc deleted file mode 100644 index 8e06acbc..00000000 --- a/py2cbf/pycbf.toc +++ /dev/null @@ -1,21 +0,0 @@ -\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 index 5f18b242..1dd7af73 100644 --- a/py2cbf/pycbf.w +++ b/py2cbf/pycbf.w @@ -557,7 +557,7 @@ if __name__=="__main__": @} -\subsection{Version of pycbf_test1 with write logic added} +\subsection{Version of pycbf\_test1 with write logic added} @o pycbf_test4.py -i -t @{ diff --git a/py2cbf/pycbf_wrap.c b/py2cbf/pycbf_wrap.c deleted file mode 100644 index 31e3e37f..00000000 --- a/py2cbf/pycbf_wrap.c +++ /dev/null @@ -1,29181 +0,0 @@ -/* ---------------------------------------------------------------------------- - * 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/pycbf/CBFlib.txt b/pycbf/CBFlib.txt deleted file mode 100644 index d47b4e55..00000000 --- a/pycbf/CBFlib.txt +++ /dev/null @@ -1,12207 +0,0 @@ - [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 - - (c) 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. - headers Controls interprestation 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 - - 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). - 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 - - 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. - datablockname 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_datablock - - 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 AA. - - 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 AA to wavelength. - - ARGUMENTS - - handle CBF handle. - wavelength Wavelength in AA. - - 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 canOt 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 canOt 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, cbf_set_3d_image, - 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. - 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. - - ---------------------------------------------------------------------- - - 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 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. - - ---------------------------------------------------------------------- - - 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. - 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. - - ---------------------------------------------------------------------- - - 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, - set_reference_beam_center, set_reference_beam_center_fs, - set_reference_beam_center_fs - - 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_slow, - 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_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. - - ---------------------------------------------------------------------- - - 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 - "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 - 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 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. - area 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 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. - 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 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. - 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 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 - - 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 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 - - 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 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 - - 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 AAngstroms, and the double - values cell[3:5] giving the cell angles a, b and g in degrees. The - double values rcell[0:2] will be set to the reciprocal cell lengths a*, - b* and c* in AAngstroms-1 and the double values rcell[3:5] will be set - to the reciprocal cell angles a*, b* and g* 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. - 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. - - ---------------------------------------------------------------------- - - 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_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 2n. - - 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/pycbf/_pycbf.pyd b/pycbf/_pycbf.pyd deleted file mode 100644 index a8580cd2..00000000 Binary files a/pycbf/_pycbf.pyd and /dev/null differ diff --git a/pycbf/cbfdetectorwrappers.i b/pycbf/cbfdetectorwrappers.i index 208be2f9..7b437ecb 100644 --- a/pycbf/cbfdetectorwrappers.i +++ b/pycbf/cbfdetectorwrappers.i @@ -30,90 +30,12 @@ typedef cbf_detector_struct *cbf_detector; cbf_failnez(cbf_free_detector(self)); } %feature("autodoc", " -Returns : double fastaxis1,double fastaxis2,double fastaxis3 +Returns : double index1,double index2,double center1,double center2 *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_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_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 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 : -*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); +C prototype: int cbf_get_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION @@ -167,132 +89,22 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_reference_beam_center_fs; +")get_beam_center; - 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)); +%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 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 slowaxis1,double slowaxis2,double slowaxis3 +Returns : double indexfast,double indexslow,double centerfast,double centerslow *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 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 : -*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); +C prototype: int cbf_get_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION @@ -346,20 +158,22 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_beam_center; +")get_beam_center_fs; - void set_beam_center(double *indexslow, double *indexfast, - double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, - centerslow, centerfast)); +%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 : double indexfast,double indexslow,double centerfast,double centerslow +Returns : double indexslow,double indexfast,double centerslow,double centerfast *args : -C prototype: int cbf_get_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); +C prototype: int cbf_get_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION @@ -413,54 +227,22 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center_fs; +")get_beam_center_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 *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 indexfast,double indexslow,double centerfast,double centerslow +*args : double indexslow,double indexfast,double centerslow,double centerfast -C prototype: int cbf_set_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); +C prototype: int cbf_set_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION @@ -514,20 +296,20 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_beam_center_fs; +")set_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)); + 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 : -*args : double indexslow,double indexfast,double centerslow,double centerfast +*args : double indexfast,double indexslow,double centerfast,double centerslow -C prototype: int cbf_set_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); +C prototype: int cbf_set_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION @@ -581,70 +363,19 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_beam_center_sf; +")set_beam_center_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)); + 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 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 indexslow,double indexfast,double centerslow,double centerfast -*args : +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast -C prototype: int cbf_get_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, +C prototype: int cbf_set_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, double *centerfast); CBFLib documentation: @@ -699,213 +430,19 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center_sf; +")set_beam_center_sf; -%apply double *OUTPUT {double *indexslow, double *indexfast, - double *centerslow,double *centerfast}; - void get_beam_center_sf(double *indexslow, double *indexfast, + void set_beam_center_sf(double *indexslow, double *indexfast, double *centerslow,double *centerfast){ - cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, + cbf_failnez(cbf_set_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); - -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 : 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 - -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 : 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_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_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 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)); - } - -%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, +C prototype: int cbf_set_reference_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, double *centerfast); CBFLib documentation: @@ -960,117 +497,20 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_reference_beam_center_sf; +")set_reference_beam_center; - void set_reference_beam_center_sf(double *indexslow, double *indexfast, + void set_reference_beam_center(double *indexslow, double *indexfast, double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast)); } %feature("autodoc", " -Returns : double coordinate1,double coordinate2,double coordinate3 -*args : double indexfast,double indexslow +Returns : +*args : double indexfast,double indexslow,double centerfast,double centerslow -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 : 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 : 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. -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_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 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); +C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION @@ -1124,105 +564,19 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center; +")set_reference_beam_center_fs; -%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)); + 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 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 : 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_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_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 : *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, +C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, double *centerfast); CBFLib documentation: @@ -1277,78 +631,604 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_reference_beam_center; +")set_reference_beam_center_sf; - void set_reference_beam_center(double *indexslow, double *indexfast, + void set_reference_beam_center_sf(double *indexslow, double *indexfast, double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, + cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, centerslow, centerfast)); } %feature("autodoc", " -Returns : Float pixel size -*args : Int axis_number +Returns : double distance +*args : -C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, - int axis_number, double *psize); +C prototype: int cbf_get_detector_distance (cbf_detector detector, + double *distance); 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_distance sets *distance to the nearest distance from +the sample position to the detector plane. ARGUMENTS -detector Detector handle. axis_number The number of the axis. -area Pointer to the destination pizel size in mm. +detector Detector handle. distance Pointer to the destination +distance. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_inferred_pixel_size; +")get_detector_distance; -%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)); - } +%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 +Returns : double normal1,double normal2,double normal3 +*args : -C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, - int axis_number, double *psize); +C prototype: int cbf_get_detector_normal (cbf_detector detector, + 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 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. axis_number The number of the axis. -area Pointer to the destination pizel size in mm. +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_fs; +")get_detector_normal; -%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)); +%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 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 +")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 : + +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 +")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 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 +")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 +*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 +")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 +")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 : 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 +")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 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 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 : 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 : 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)); + } + +%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 : 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 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 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 : 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 : 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 : 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)); } }; // End of cbf_detector diff --git a/pycbf/cbfgenericwrappers.i b/pycbf/cbfgenericwrappers.i index b9b7b567..810af3ea 100644 --- a/pycbf/cbfgenericwrappers.i +++ b/pycbf/cbfgenericwrappers.i @@ -2,52 +2,85 @@ // Start of generic functions %feature("autodoc","1"); -/* cfunc cbf_compute_reciprocal_cell pyfunc compute_reciprocal_cell - arg double cell[6] arg double rcell[6] */ +/* cfunc cbf_get_local_integer_byte_order pyfunc get_local_integer_byte_order + arg char ** byte_order */ %feature("autodoc", " -Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, - Float gammastar -*args : double cell[6] +Returns : char **bo,int *bolen +*args : -C prototype: int cbf_compute_reciprocal_cell ( double cell[6], - double rcell[6] ); +C prototype: int cbf_get_local_integer_byte_order (char ** byte_order); 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 AAngstroms, and the double -values cell[3:5] giving the cell angles a, b and g in degrees. The -double values rcell[0:2] will be set to the reciprocal cell lengths -a*, b* and c* in AAngstroms-1 and the double values rcell[3:5] will -be set to the reciprocal cell angles a*, b* and g* 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; +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 +")get_local_integer_byte_order; -%apply double *OUTPUT {double *astar, double *bstar, double *cstar, - double *alphastar, double *betastar, double *gammastar}; +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); %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]; + 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_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 +")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_get_local_real_format pyfunc get_local_real_format arg char ** real_format */ @@ -73,13 +106,7 @@ 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. ----------------------------------------------------------------------- +returned by future versions ")get_local_real_format; %cstring_output_allocate_size(char **rf, int *rflen, free(*$1)); @@ -95,63 +122,94 @@ Returns an error code on failure or 0 for success. } } -/* cfunc cbf_get_local_integer_byte_order pyfunc get_local_integer_byte_order - arg char ** byte_order */ +/* cfunc cbf_compute_cell_volume pyfunc compute_cell_volume + arg double cell[6] arg double *volume */ %feature("autodoc", " -Returns : char **bo,int *bolen -*args : +Returns : Float volume +*args : double cell[6] -C prototype: int cbf_get_local_integer_byte_order (char ** byte_order); +C prototype: int cbf_compute_cell_volume ( double cell[6], double *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. +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 -byte_order pointer to the returned string real_format pointer to -the returned string +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. ----------------------------------------------------------------------- -")get_local_integer_byte_order; +SEE ALSO +")compute_cell_volume; -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + +%apply double *OUTPUT {double *volume}; %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; + void compute_cell_volume(double cell[6], double *volume) { + cbf_failnez(cbf_compute_cell_volume(cell,volume)); } } -/* 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 */ +/* cfunc cbf_compute_reciprocal_cell pyfunc compute_reciprocal_cell + arg double cell[6] arg double rcell[6] */ %feature("autodoc", " -Returns : Float volumeout -*args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny, - double volumein,double fwhm +Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar +*args : double cell[6] -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); +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 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 @@ -184,26 +242,28 @@ Pointer to the value of the integral/TR> RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")airy_disk_volume; +")airy_disk; -%apply double *OUTPUT {double *volumeout}; +%apply double *OUTPUT {double *value}; %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)); +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 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_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 value -*args : double x,double y,double cenx,double ceny,double volume,double fwhm +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(double x, double y, double cenx, double ceny, - double volume, double fwhm, double * value); +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 @@ -236,91 +296,14 @@ Pointer to the value of the integral/TR> RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")airy_disk; +")airy_disk_volume; -%apply double *OUTPUT {double *value}; +%apply double *OUTPUT {double *volumeout}; %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)); +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)); } } - -/* 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_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 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 -")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)); - } - } // End of generic functions diff --git a/pycbf/cbfgoniometerwrappers.i b/pycbf/cbfgoniometerwrappers.i index b2a9901a..e3f9a49c 100644 --- a/pycbf/cbfgoniometerwrappers.i +++ b/pycbf/cbfgoniometerwrappers.i @@ -40,120 +40,11 @@ typedef cbf_positioner_struct *cbf_goniometer; cbf_failnez(cbf_free_positioner(self)); } %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. 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. ----------------------------------------------------------------------- -")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 vector1,double vector2,double vector3 *args : C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, - unsigned int reserved, double *vector1, double *vector2, + unsigned int reserved, double *vector1, double *vector2, double *vector3); CBFLib documentation: @@ -186,7 +77,7 @@ Returns : Float start,Float increment *args : C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer, - unsigned int reserved, double *start, double *increment); + unsigned int reserved, double *start, double *increment); CBFLib documentation: DESCRIPTION @@ -212,14 +103,43 @@ Returns an error code on failure or 0 for success. 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. +")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 : 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); + unsigned int reserved, double ratio, double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3); CBFLib documentation: DESCRIPTION @@ -228,7 +148,7 @@ 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 +Å 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. @@ -236,8 +156,8 @@ 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 +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 @@ -262,5 +182,71 @@ Returns an error code on failure or 0 for success. 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 + +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)); + } + }; // End of cbf_positioner diff --git a/pycbf/cbfhandlewrappers.i b/pycbf/cbfhandlewrappers.i index db57d640..c8334556 100644 --- a/pycbf/cbfhandlewrappers.i +++ b/pycbf/cbfhandlewrappers.i @@ -43,3023 +43,1939 @@ typedef cbf_handle_struct handle; ~cbf_handle_struct(){ // Destructor cbf_failnez(cbf_free_handle(self)); } - -/* cfunc cbf_set_saveframename pyfunc set_saveframename - arg cbf_handle handle arg const char *saveframename */ - %feature("autodoc", " -Returns : string -*args : +Returns : +*args : String filename,Integer headers -C prototype: int cbf_set_saveframename (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); 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_saveframename; - void set_saveframename(const char* arg){ - cbf_failnez(cbf_set_saveframename(self,arg));} +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 : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast +Returns : +*args : String filename,Integer headers -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_read_widefile (cbf_handle handle, FILE *file, int flags); 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 -%{ -#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 +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 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; - } + 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 : -*args : String format,Float number +*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding -C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, - double number); +C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + int ciforcbf, int flags, int encoding); 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_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); +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 : +*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_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_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(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_new_datablock pyfunc new_datablock + arg cbf_handle handle arg const char *datablockname */ + %feature("autodoc", " -Returns : Float time,Integer timezone +Returns : string *args : -C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, - double *time, int *timezone); +C prototype: int cbf_new_datablock (cbf_handle handle, + const char *datablockname); 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_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. 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. 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. ----------------------------------------------------------------------- -")get_timestamp; +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 */ -%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 : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimslow +Returns : string +*args : -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); +C prototype: int cbf_new_saveframe (cbf_handle handle, + const char *saveframename); 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_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. 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 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_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); - } - } +SEE ALSO +")new_saveframe; + void new_saveframe(const char* arg){ + cbf_failnez(cbf_new_saveframe(self,arg));} -/* cfunc cbf_get_integervalue pyfunc get_integervalue - arg cbf_handle handle arg int *number */ +/* cfunc cbf_force_new_datablock pyfunc force_new_datablock + arg cbf_handle handle arg const char *datablockname */ %feature("autodoc", " -Returns : int +Returns : string *args : -C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); +C prototype: int cbf_force_new_datablock (cbf_handle handle, + const char *datablockname); 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_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. number pointer to the number. -defaultvalue default number value. +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_integervalue; - int get_integervalue(void){ - int result; - cbf_failnez(cbf_get_integervalue(self,&result)); - return result;} +")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 */ + %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_force_new_saveframe (cbf_handle handle, + const char *saveframename); 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_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. 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. 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. ----------------------------------------------------------------------- -")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)); - } +SEE ALSO +")force_new_saveframe; + void force_new_saveframe(const char* arg){ + cbf_failnez(cbf_force_new_saveframe(self,arg));} -/* cfunc cbf_rewind_blockitem pyfunc rewind_blockitem - arg cbf_handle handle arg CBF_NODETYPE * type */ +/* cfunc cbf_new_category pyfunc new_category + arg cbf_handle handle arg const char *categoryname */ %feature("autodoc", " -Returns : CBF_NODETYPE +Returns : string *args : -C prototype: int cbf_rewind_blockitem (cbf_handle handle, - CBF_NODETYPE * type); +C prototype: int cbf_new_category (cbf_handle handle, + const char *categoryname); 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_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. type 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 -")rewind_blockitem; - CBF_NODETYPE rewind_blockitem(void){ - CBF_NODETYPE result; - cbf_failnez(cbf_rewind_blockitem(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 : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast +Returns : string +*args : -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); +C prototype: int cbf_force_new_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 -")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; -%{ -#define SWIG_PYTHON_STRICT_BYTE_CHAR -%} +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));} -// Get the length correct +/* cfunc cbf_new_column pyfunc new_column + arg cbf_handle handle arg const char *columnname */ - 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 : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimmid,int dimslow +Returns : string +*args : -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_new_column (cbf_handle handle, const char *columnname); 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_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. 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 The name of the new column. 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 */ +SEE ALSO +")new_column; + void new_column(const char* arg){ + cbf_failnez(cbf_new_column(self,arg));} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; +/* cfunc cbf_new_row pyfunc new_row + arg cbf_handle handle */ - 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 : String filename +*args : -C prototype: int cbf_read_template (cbf_handle handle, FILE *file); +C prototype: int cbf_new_row (cbf_handle handle); 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_new_row adds a new row to the current category and makes it the +current row. ARGUMENTS -handle Pointer to a CBF handle. file Pointer to a file -descriptor. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")read_template; +SEE ALSO +")new_row; + void new_row(void){ + cbf_failnez(cbf_new_row(self));} - 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_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); -/* cfunc cbf_select_column pyfunc select_column - arg cbf_handle handle arg unsigned int column */ +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_delete_row pyfunc delete_row + arg cbf_handle handle arg unsigned int rownumber */ %feature("autodoc", " Returns : *args : Integer -C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); +C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); 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_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. column Number of the column to select. +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 -")select_column; - void select_column(unsigned int arg){ - cbf_failnez(cbf_select_column(self,arg));} +")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 */ + %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_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_datablockname (cbf_handle handle, + const char *datablockname); 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_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. 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. 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 -")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; - - } +")set_datablockname; + void set_datablockname(const char* arg){ + cbf_failnez(cbf_set_datablockname(self,arg));} -/* cfunc cbf_find_datablock pyfunc find_datablock - arg cbf_handle handle arg const char *datablockname */ +/* cfunc cbf_set_saveframename pyfunc set_saveframename + arg cbf_handle handle arg const char *saveframename */ %feature("autodoc", " Returns : string *args : -C prototype: int cbf_find_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_set_saveframename (cbf_handle handle, + const char *saveframename); 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_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 name of the data -block to find. +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 -")find_datablock; - void find_datablock(const char* arg){ - cbf_failnez(cbf_find_datablock(self,arg));} +")set_saveframename; + void set_saveframename(const char* arg){ + cbf_failnez(cbf_set_saveframename(self,arg));} + +/* cfunc cbf_reset_datablocks pyfunc reset_datablocks + arg cbf_handle handle */ + %feature("autodoc", " Returns : -*args : String tagname,String tagroot_in +*args : -C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, - const char*tagroot_in); +C prototype: int cbf_reset_datablocks (cbf_handle handle); 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_reset_datablocks deletes all categories from all data blocks. +The current data block does not change. 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. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_tag_root; +SEE ALSO +")reset_datablocks; + void reset_datablocks(void){ + cbf_failnez(cbf_reset_datablocks(self));} + +/* cfunc cbf_reset_datablock pyfunc reset_datablock + arg cbf_handle handle */ -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 : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast +*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_reset_datablock (cbf_handle handle); 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_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. 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. 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 */ +SEE ALSO +")reset_datablock; + void reset_datablock(void){ + cbf_failnez(cbf_reset_datablock(self));} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; +/* cfunc cbf_reset_saveframe pyfunc reset_saveframe + arg cbf_handle handle */ - 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); - } - } %feature("autodoc", " Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimfast +*args : -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_reset_saveframe (cbf_handle handle); 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_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. 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. 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 */ +SEE ALSO +")reset_saveframe; + void reset_saveframe(void){ + cbf_failnez(cbf_reset_saveframe(self));} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; +/* cfunc cbf_reset_category pyfunc reset_category + arg cbf_handle handle */ - 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 +Returns : +*args : -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); +C prototype: int cbf_reset_category (cbf_handle handle); 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; -%{ -#define SWIG_PYTHON_STRICT_BYTE_CHAR -%} +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));} -// Get the length correct +/* cfunc cbf_remove_datablock pyfunc remove_datablock + arg cbf_handle handle */ - 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 : 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_remove_datablock (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_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. 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. ----------------------------------------------------------------------- -")set_tag_category; +SEE ALSO +")remove_datablock; + void remove_datablock(void){ + cbf_failnez(cbf_remove_datablock(self));} - void set_tag_category(const char *tagname, const char* categoryname_in){ - cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); - } +/* cfunc cbf_remove_saveframe pyfunc remove_saveframe + arg cbf_handle handle */ -/* cfunc cbf_get_typeofvalue pyfunc get_typeofvalue - arg cbf_handle handle arg const char **typeofvalue */ +%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));} + +/* cfunc cbf_remove_category pyfunc remove_category + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : string +*args : -C prototype: int cbf_get_typeofvalue (cbf_handle handle, - const char **typeofvalue); +C prototype: int cbf_remove_category (cbf_handle handle); 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_remove_category deletes the current category. +The current category becomes undefined. ARGUMENTS -handle CBF handle. typeofvalue Pointer to the destination -type-of-value string pointer. +handle CBF handle. 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;} +")remove_category; + void remove_category(void){ + cbf_failnez(cbf_remove_category(self));} + +/* cfunc cbf_remove_column pyfunc remove_column + arg cbf_handle handle */ + %feature("autodoc", " Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast +*args : -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_remove_column (cbf_handle handle); 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_remove_column deletes the current column. +The current column becomes undefined. 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. 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); - } - } +SEE ALSO +")remove_column; + void remove_column(void){ + cbf_failnez(cbf_remove_column(self));} -/* cfunc cbf_datablock_name pyfunc datablock_name - arg cbf_handle handle arg const char **datablockname */ +/* cfunc cbf_remove_row pyfunc remove_row + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : string +*args : -C prototype: int cbf_datablock_name (cbf_handle handle, - const char **datablockname); +C prototype: int cbf_remove_row (cbf_handle handle); 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_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. datablockname Pointer to the -destination data block name pointer. +handle CBF handle. 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;} +")remove_row; + void remove_row(void){ + cbf_failnez(cbf_remove_row(self));} + +/* cfunc cbf_rewind_datablock pyfunc rewind_datablock + arg cbf_handle handle */ + %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 : *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_rewind_datablock (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_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. 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 -")get_integerarrayparameters_wdims; +")rewind_datablock; + void rewind_datablock(void){ + cbf_failnez(cbf_rewind_datablock(self));} -%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_rewind_category pyfunc rewind_category + arg cbf_handle handle */ - 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 : pycbf detector object -*args : Integer element_number +Returns : +*args : -C prototype: int cbf_construct_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +C prototype: int cbf_rewind_category (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_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. 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. type CBF handle. 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; - } +SEE ALSO +")rewind_category; + void rewind_category(void){ + cbf_failnez(cbf_rewind_category(self));} -/* cfunc cbf_set_typeofvalue pyfunc set_typeofvalue - arg cbf_handle handle arg const char *typeofvalue */ +/* cfunc cbf_rewind_saveframe pyfunc rewind_saveframe + arg cbf_handle handle */ %feature("autodoc", " -Returns : string +Returns : *args : -C prototype: int cbf_set_typeofvalue (cbf_handle handle, - const char *typeofvalue); +C prototype: int cbf_rewind_saveframe (cbf_handle handle); 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_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. typeofvalue ASCII string for desired type -of value. +handle CBF handle. type CBF handle. 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));} +")rewind_saveframe; + void rewind_saveframe(void){ + cbf_failnez(cbf_rewind_saveframe(self));} -/* cfunc cbf_find_column pyfunc find_column - arg cbf_handle handle arg const char *columnname */ +/* cfunc cbf_rewind_blockitem pyfunc rewind_blockitem + arg cbf_handle handle arg CBF_NODETYPE * type */ %feature("autodoc", " -Returns : string +Returns : CBF_NODETYPE *args : -C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); +C prototype: int cbf_rewind_blockitem (cbf_handle handle, + CBF_NODETYPE * type); 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_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. columnname The name of column to find. +handle CBF handle. type CBF handle. 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));} +")rewind_blockitem; + CBF_NODETYPE rewind_blockitem(void){ + CBF_NODETYPE result; + cbf_failnez(cbf_rewind_blockitem(self,&result)); + return result;} -/* cfunc cbf_require_column pyfunc require_column - arg cbf_handle handle arg const char *columnname */ +/* cfunc cbf_rewind_column pyfunc rewind_column + arg cbf_handle handle */ %feature("autodoc", " -Returns : string +Returns : *args : -C prototype: int cbf_require_column (cbf_handle handle, - const char *columnname); +C prototype: int cbf_rewind_column (cbf_handle handle); 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. +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 The name of column to find. +handle CBF handle. 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));} +")rewind_column; + void rewind_column(void){ + cbf_failnez(cbf_rewind_column(self));} + +/* cfunc cbf_rewind_row pyfunc rewind_row + arg cbf_handle handle */ + %feature("autodoc", " Returns : -*args : String categoryname,String categoryroot +*args : -C prototype: int cbf_set_category_root (cbf_handle handle, - const char* categoryname_in, const char*categoryroot); +C prototype: int cbf_rewind_row (cbf_handle handle); 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_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. 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. 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)); -} +SEE ALSO +")rewind_row; + void rewind_row(void){ + cbf_failnez(cbf_rewind_row(self));} -/* cfunc cbf_get_diffrn_id pyfunc get_diffrn_id - arg cbf_handle handle arg const char **diffrn_id */ +/* cfunc cbf_next_datablock pyfunc next_datablock + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : string +*args : -C prototype: int cbf_get_diffrn_id (cbf_handle handle, - const char **diffrn_id); +C prototype: int cbf_next_datablock (cbf_handle handle); 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_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. diffrn_id Pointer to the destination -value pointer. default_id Character string default value. +handle CBF handle. 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 +")next_datablock; + void next_datablock(void){ + cbf_failnez(cbf_next_datablock(self));} + +/* cfunc cbf_next_category pyfunc next_category + arg cbf_handle handle */ + %feature("autodoc", " Returns : -*args : Float div_x_source,Float div_y_source,Float div_x_y_source +*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_next_category (cbf_handle handle); 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_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. 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. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_divergence; +SEE ALSO +")next_category; + void next_category(void){ + cbf_failnez(cbf_next_category(self));} + +/* cfunc cbf_next_column pyfunc next_column + arg cbf_handle handle */ - 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)); - } %feature("autodoc", " -Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast -*args : Integer element_number +Returns : +*args : -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); +C prototype: int cbf_next_column (cbf_handle handle); 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; - } +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));} + +/* cfunc cbf_next_row pyfunc next_row + arg cbf_handle handle */ + %feature("autodoc", " Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimmid,int dimslow +*args : -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_next_row (cbf_handle handle); 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_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. 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. 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 */ +SEE ALSO +")next_row; + void next_row(void){ + cbf_failnez(cbf_next_row(self));} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; +/* cfunc cbf_find_datablock pyfunc find_datablock + arg cbf_handle handle arg const char *datablockname */ - 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 : size_t ndimfast,size_t ndimmid,size_t ndimslow -*args : Integer element_number +Returns : string +*args : -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_find_datablock (cbf_handle handle, + const char *datablockname); 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; +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_find_category pyfunc find_category + arg cbf_handle handle arg const char *categoryname */ -%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 : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast +Returns : string +*args : -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); +C prototype: int cbf_find_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 -")get_image_as_string; +cbf_find_category makes the category in the current data block with +name categoryname the current category. cbf_find_saveframe makes the +saveframe in the current data block with name saveframename the +current saveframe. +The comparison is case-insensitive. +If the category or saveframe 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. saveframename The name of the saveframe 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));} -// 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 +/* cfunc cbf_find_saveframe pyfunc find_saveframe + arg cbf_handle handle arg const char *saveframename */ - 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 : Float gain,Float gain_esd +Returns : string +*args : -C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, - double gain, double gain_esd); +C prototype: int cbf_find_saveframe (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION -cbf_set_gain sets the gain of element number element_number to the -values specified by gain and gain_esd. +cbf_find_category makes the category in the current data block with +name categoryname the current category. cbf_find_saveframe makes the +saveframe in the current data block with name saveframename the +current saveframe. +The comparison is case-insensitive. +If the category or saveframe does not exist, the function returns +CBF_NOTFOUND. +The current column and row become undefined. 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. categoryname The name of the category +to find. saveframename The name of the saveframe to find. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_gain; +SEE ALSO +")find_saveframe; + void find_saveframe(const char* arg){ + cbf_failnez(cbf_find_saveframe(self,arg));} + +/* cfunc cbf_find_column pyfunc find_column + arg cbf_handle handle arg const char *columnname */ - 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 div_x_source,Float div_y_source,Float div_x_y_source +Returns : string *args : -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_find_column (cbf_handle handle, const char *columnname); 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_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. 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. columnname The name of column to find. 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)); - } +SEE ALSO +")find_column; + void find_column(const char* arg){ + cbf_failnez(cbf_find_column(self,arg));} -/* cfunc cbf_rewind_column pyfunc rewind_column - arg cbf_handle handle */ +/* cfunc cbf_find_row pyfunc find_row + arg cbf_handle handle arg const char *value */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_rewind_column (cbf_handle handle); +C prototype: int cbf_find_row (cbf_handle handle, const char *value); 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_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. +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 -")rewind_column; - void rewind_column(void){ - cbf_failnez(cbf_rewind_column(self));} +")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 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_find_nextrow (cbf_handle handle, const char *value); 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_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. 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 the value to search for. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_pixel_size_sf; +SEE ALSO +")find_nextrow; + void find_nextrow(const char* arg){ + cbf_failnez(cbf_find_nextrow(self,arg));} + +/* cfunc cbf_count_datablocks pyfunc count_datablocks + arg cbf_handle handle arg unsigned int *datablocks */ -%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 compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast +Returns : Integer +*args : -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_count_datablocks (cbf_handle handle, + unsigned int *datablocks); 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_count_datablocks puts the number of data blocks in *datablocks . 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. datablocks Pointer to the destination data +block count. 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 */ +SEE ALSO +")count_datablocks; + unsigned int count_datablocks(void){ + unsigned int result; + cbf_failnez(cbf_count_datablocks(self,&result)); + return result;} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; +/* cfunc cbf_count_categories pyfunc count_categories + arg cbf_handle handle arg unsigned int *categories */ - 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 : 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; - - /* 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)); - } +SEE ALSO +")count_categories; + unsigned int count_categories(void){ + unsigned int result; + cbf_failnez(cbf_count_categories(self,&result)); + return result;} -/* cfunc cbf_insert_row pyfunc insert_row - arg cbf_handle handle arg unsigned int rownumber */ +/* cfunc cbf_count_columns pyfunc count_columns + arg cbf_handle handle arg unsigned int *columns */ %feature("autodoc", " -Returns : -*args : Integer +Returns : Integer +*args : -C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); +C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); 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_columns puts the number of columns in the current category +in *columns. ARGUMENTS -handle CBF handle. rownumber The row number of the new row. +handle CBF handle. columns Pointer to the destination column +count. 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));} +")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 : -*args : double cell[6] +Returns : Integer +*args : -C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); 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. +cbf_count_rows puts the number of rows in the current category in +*rows . 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. +handle CBF handle. rows Pointer to the destination row count. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_reciprocal_cell; +")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 */ - void set_reciprocal_cell(double cell[6]) { - cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); - } %feature("autodoc", " Returns : -*args : double cell_esd[6] +*args : Integer -C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_select_datablock (cbf_handle handle, + unsigned int datablock); 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. +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. 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. +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 -")set_reciprocal_cell_esd; +")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 */ - void set_reciprocal_cell_esd(double cell_esd[6]) { - cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); - } %feature("autodoc", " -Returns : pycbf positioner object -*args : String axis_id +Returns : +*args : Integer -C prototype: int cbf_construct_positioner (cbf_handle handle, - cbf_positioner *positioner, const char *axis_id); +C prototype: int cbf_select_category (cbf_handle handle, + unsigned int category); 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_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. detector Pointer to the destination detector -handle. axis_id The identifier of the axis in the \"axis \" -category. +handle CBF handle. category Number of the category to select. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")construct_positioner; +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 */ - 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 : -*args : double cell[6] +*args : Integer -C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); 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_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. 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. column Number of the column to select. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_unit_cell; +")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 */ - void set_unit_cell(double cell[6]) { - cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); - } %feature("autodoc", " Returns : -*args : double cell_esd[6] +*args : Integer -C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); 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_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. 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. row Number of the row to select. 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)); - } +")select_row; + void select_row(unsigned int arg){ + cbf_failnez(cbf_select_row(self,arg));} -/* cfunc cbf_set_crystal_id pyfunc set_crystal_id - arg cbf_handle handle arg const char *crystal_id */ +/* cfunc cbf_datablock_name pyfunc datablock_name + arg cbf_handle handle arg const char **datablockname */ %feature("autodoc", " -Returns : string -*args : +Returns : +*args : string -C prototype: int cbf_set_crystal_id (cbf_handle handle, - const char *crystal_id); +C prototype: int cbf_datablock_name (cbf_handle handle, + const char **datablockname); CBFLib documentation: DESCRIPTION -cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the -ASCII value crystal_id. +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. crystal_id ASCII 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. ----------------------------------------------------------------------- -")set_crystal_id; - void set_crystal_id(const char* arg){ - cbf_failnez(cbf_set_crystal_id(self,arg));} +SEE ALSO +")datablock_name; + const char* datablock_name(void){ + 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 : 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 : string -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_category_name (cbf_handle handle, + const char **categoryname); 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_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 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. categoryname Pointer to the destination +category name pointer. 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; - - } +")category_name; + const char* category_name(void){ + const char* result; + cbf_failnez(cbf_category_name(self, &result)); + return result;} -/* cfunc cbf_set_diffrn_id pyfunc set_diffrn_id - arg cbf_handle handle arg const char *diffrn_id */ +/* cfunc cbf_column_name pyfunc column_name + arg cbf_handle handle arg const char **columnname */ %feature("autodoc", " -Returns : string -*args : +Returns : +*args : string -C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); +C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); 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_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. diffrn_id ASCII value. +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. ----------------------------------------------------------------------- -")set_diffrn_id; - void set_diffrn_id(const char* arg){ - cbf_failnez(cbf_set_diffrn_id(self,arg));} +SEE ALSO +")column_name; + const char* column_name(void){ + const char* result; + cbf_failnez(cbf_column_name(self, &result)); + return result;} -/* cfunc cbf_set_integervalue pyfunc set_integervalue - arg cbf_handle handle arg int number */ +/* cfunc cbf_row_number pyfunc row_number + arg cbf_handle handle arg unsigned int *row */ %feature("autodoc", " -Returns : int number +Returns : Integer *args : -C prototype: int cbf_set_integervalue (cbf_handle handle, int number); +C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); 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_row_number sets *row to the number of the current row of the +current category. ARGUMENTS -handle CBF handle. number Integer value. +handle CBF handle. row Pointer to the destination row number. 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));} +")row_number; + unsigned int row_number(void){ + unsigned int result; + cbf_failnez(cbf_row_number(self,&result)); + return result;} -/* cfunc cbf_count_datablocks pyfunc count_datablocks - arg cbf_handle handle arg unsigned int *datablocks */ +/* cfunc cbf_get_value pyfunc get_value + arg cbf_handle handle arg const char **value */ %feature("autodoc", " -Returns : Integer -*args : +Returns : +*args : string -C prototype: int cbf_count_datablocks (cbf_handle handle, - unsigned int *datablocks); +C prototype: int cbf_get_value (cbf_handle handle, const char **value); CBFLib documentation: DESCRIPTION -cbf_count_datablocks puts the number of data blocks in *datablocks . +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. datablocks Pointer to the destination data -block count. +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 -")count_datablocks; - unsigned int count_datablocks(void){ - unsigned int result; - cbf_failnez(cbf_count_datablocks(self,&result)); - return result;} +")get_value; + const char* get_value(void){ + const char* result; + cbf_failnez(cbf_get_value(self, &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 +Returns : String Value +*args : String defaultvalue -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_require_value (cbf_handle handle, const char **value, + const char *defaultvalue ); 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_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. 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. 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 -")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 */ +")require_value; -%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); - } + 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 : String categoryroot -*args : String Categoryname +Returns : string +*args : -C prototype: int cbf_require_category_root (cbf_handle handle, - const char* categoryname, const char** categoryroot); +C prototype: int cbf_set_value (cbf_handle handle, const char *value); 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_set_value sets the item at the current column and row to the +ASCII value value. 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. value ASCII value. 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; -} +SEE ALSO +")set_value; + void set_value(const char* arg){ + cbf_failnez(cbf_set_value(self,arg));} + +/* cfunc cbf_get_typeofvalue pyfunc get_typeofvalue + arg cbf_handle handle arg const char **typeofvalue */ + %feature("autodoc", " -Returns : String -*args : String axis_id +Returns : +*args : string -C prototype: int cbf_get_axis_equipment (cbf_handle handle, - const char *axis_id, const char * *equipment); +C prototype: int cbf_get_typeofvalue (cbf_handle handle, + const char **typeofvalue); 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_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. 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. typeofvalue Pointer to the destination +type-of-value string pointer. 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; - } +SEE ALSO +")get_typeofvalue; + const char* get_typeofvalue(void){ + const char* result; + cbf_failnez(cbf_get_typeofvalue(self, &result)); + return result;} -/* cfunc cbf_set_value pyfunc set_value - arg cbf_handle handle arg const char *value */ +/* 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_value (cbf_handle handle, const char *value); +C prototype: int cbf_set_typeofvalue (cbf_handle handle, + const char *typeofvalue); CBFLib documentation: DESCRIPTION -cbf_set_value sets the item at the current column and row to the -ASCII value value. +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 types 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. value ASCII value. +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_value; - void set_value(const char* arg){ - cbf_failnez(cbf_set_value(self,arg));} +")set_typeofvalue; + void set_typeofvalue(const char* arg){ + cbf_failnez(cbf_set_typeofvalue(self,arg));} -/* cfunc cbf_new_category pyfunc new_category - arg cbf_handle handle arg const char *categoryname */ +/* cfunc cbf_get_integervalue pyfunc get_integervalue + arg cbf_handle handle arg int *number */ %feature("autodoc", " -Returns : string +Returns : int *args : -C prototype: int cbf_new_category (cbf_handle handle, - const char *categoryname); +C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); 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. +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. categoryname The name of the new -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 -")new_category; - void new_category(const char* arg){ - cbf_failnez(cbf_new_category(self,arg));} +")get_integervalue; + int get_integervalue(void){ + int result; + cbf_failnez(cbf_get_integervalue(self,&result)); + return result;} %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimslow +Returns : Int number +*args : Int thedefault -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_integervalue (cbf_handle handle, int *number, + int 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_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. 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. number pointer to the number. +defaultvalue default number value. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_image_fs; +SEE ALSO +")require_integervalue; - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ +%apply int *OUTPUT {int *number} require_integervalue; -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + void require_integervalue(int *number, int thedefault){ - 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); - } - } + cbf_failnez(cbf_require_integervalue(self,number,thedefault)); -/* cfunc cbf_find_nextrow pyfunc find_nextrow - arg cbf_handle handle arg const char *value */ + } + +/* cfunc cbf_set_integervalue pyfunc set_integervalue + arg cbf_handle handle arg int number */ %feature("autodoc", " -Returns : string +Returns : int number *args : -C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); +C prototype: int cbf_set_integervalue (cbf_handle handle, int number); 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_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. value the value to search for. +handle CBF handle. number Integer value. 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));} +")set_integervalue; + void set_integervalue(int number){ + cbf_failnez(cbf_set_integervalue(self,number));} -/* cfunc cbf_select_row pyfunc select_row - arg cbf_handle handle arg unsigned int row */ +/* cfunc cbf_get_doublevalue pyfunc get_doublevalue + arg cbf_handle handle arg double *number */ %feature("autodoc", " -Returns : -*args : Integer +Returns : double +*args : -C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); +C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); 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_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. row Number of the row to select. +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 -")select_row; - void select_row(unsigned int arg){ - cbf_failnez(cbf_select_row(self,arg));} +")get_doublevalue; + double get_doublevalue(void){ + double result; + cbf_failnez(cbf_get_doublevalue(self,&result)); + return result;} %feature("autodoc", " -Returns : String -*args : String axis_id,Integer ancestor_index +Returns : Float Number +*args : Float Default -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_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. ----------------------------------------------------------------------- -")get_axis_ancestor; +SEE ALSO +")require_doublevalue; - 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; - } +%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 : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast +*args : String format,Float number -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_doublevalue (cbf_handle handle, const char *format, + double number); 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_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. 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. format Format for the number. number +Floating-point value. 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; +SEE ALSO +")set_doublevalue; - 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); - } - } + void set_doublevalue(const char *format, double number){ + cbf_failnez(cbf_set_doublevalue(self,format,number));} %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 : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement +*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_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_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 : 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. +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. detector Pointer to the destination detector -handle. axis_id The identifier of the axis in the \"axis \" -category. +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. ----------------------------------------------------------------------- -")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; - } - -/* cfunc cbf_find_category pyfunc find_category - arg cbf_handle handle arg const char *categoryname */ - -%feature("autodoc", " -Returns : string -*args : +SEE ALSO +")get_integerarrayparameters; -C prototype: int cbf_find_category (cbf_handle handle, - const char *categoryname); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement} + get_integerarrayparameters; -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));} + 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 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 dimfast,int dimmid,int dimslow,int padding *args : -C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, +C prototype: int cbf_get_integerarrayparameters_wdims (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); + 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 @@ -3112,28 +2028,28 @@ 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; +")get_integerarrayparameters_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_sf; + 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_realarrayparameters_wdims_sf(int *compression,int *binary_id, - int *elsize, - int *elements, + 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 *dimslow, int *dimmid, int *dimfast, int *padding + 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_sf(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&ds,&dm,&df,&pd )); + 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); @@ -3148,551 +2064,1323 @@ SEE ALSO } %feature("autodoc", " -Returns : Int number -*args : Int thedefault +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_require_integervalue (cbf_handle handle, int *number, - int defaultvalue); +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_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 -")require_integervalue; - -%apply int *OUTPUT {int *number} require_integervalue; - - void require_integervalue(int *number, int thedefault){ +")get_integerarrayparameters_wdims_fs; - cbf_failnez(cbf_require_integervalue(self,number,thedefault)); +%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; - } -%feature("autodoc", " -Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements + 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_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_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_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_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 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. 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 -")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 */ +")get_integerarrayparameters_wdims_sf; -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; +%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 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); + 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; + } - } - -/* cfunc cbf_find_row pyfunc find_row - arg cbf_handle handle arg const char *value */ - %feature("autodoc", " -Returns : string +Returns : int compression,int binary_id,int elsize,int elements *args : -C prototype: int cbf_find_row (cbf_handle handle, const char *value); +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_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_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 of the row 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 -")find_row; - void find_row(const char* arg){ - cbf_failnez(cbf_find_row(self,arg));} -%feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast +")get_realarrayparameters; -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); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elements} get_realarrayparameters; -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. + + 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 : 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 : 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 : 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; + + } +%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; +%{ +#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 : (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 +%{ +#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 : +*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); + } + } +%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 : 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 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. +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_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_real_3d_image_sf; +%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_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_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_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_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 : (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 -%{ -#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 : (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 -%{ -#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, - 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; - } - -/* cfunc cbf_force_new_datablock pyfunc force_new_datablock - arg cbf_handle handle arg const char *datablockname */ - -%feature("autodoc", " -Returns : string -*args : +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements -C prototype: int cbf_force_new_datablock (cbf_handle handle, - const char *datablockname); +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_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_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 name of the new data -block. saveframename The name of the new save frame. +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 -")force_new_datablock; - void force_new_datablock(const char* arg){ - cbf_failnez(cbf_force_new_datablock(self,arg));} +")set_realarray; -/* cfunc cbf_new_column pyfunc new_column - arg cbf_handle handle arg const char *columnname */ + /* 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 : +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_new_column (cbf_handle handle, const char *columnname); +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_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_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. columnname The name of the new column. +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 -")new_column; - void new_column(const char* arg){ - cbf_failnez(cbf_new_column(self,arg));} -%feature("autodoc", " -Returns : Integer -*args : String axis_id +")set_realarray_wdims; -C prototype: int cbf_count_axis_ancestors (cbf_handle handle, - const char *axis_id, unsigned int *ancestors); + /* 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 */ -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 (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; -%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; + 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 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 -"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 : String -*args : Integer element_number +*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_element_id (cbf_handle handle, - unsigned int element_number, const char **element_id); +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_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_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. 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. 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_element_id; +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 */ - const char * get_element_id(unsigned int element_number){ - const char * result; - cbf_failnez(cbf_get_element_id (self, element_number, &result)); - return result; - } +%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 compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimfast,int dimmid, - int dimslow,int padding + int elements,String byteorder,int dimslow,int dimmid,int dimfast, + int padding -C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, +C prototype: int cbf_set_realarray_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 dimfast, size_t dimmid, - size_t dimslow, size_t padding); + size_t elsize, size_t elements, const char *byteorder, + size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); CBFLib documentation: DESCRIPTION @@ -3735,22 +3423,22 @@ 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. +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; +")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_integerarray_wdims_fs; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; +%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_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){ + 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; @@ -3761,1344 +3449,845 @@ SEE ALSO 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)); + 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 : 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; - } - -/* 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;} - -/* cfunc cbf_next_column pyfunc next_column - arg cbf_handle handle */ +/* cfunc cbf_require_datablock pyfunc require_datablock + arg cbf_handle handle arg const char *datablockname */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_next_column (cbf_handle handle); +C prototype: int cbf_require_datablock (cbf_handle handle, + const char *datablockname); 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_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. +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 -")next_column; - void next_column(void){ - cbf_failnez(cbf_next_column(self));} -%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)); - } - } -%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; +")require_datablock; + void require_datablock(const char* arg){ + cbf_failnez(cbf_require_datablock(self,arg));} +/* cfunc cbf_require_category pyfunc require_category + arg cbf_handle handle arg const char *categoryname */ - 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 : Float overload -*args : Integer element_number +Returns : string +*args : -C prototype: int cbf_get_overload (cbf_handle handle, - unsigned int element_number, double *overload); +C prototype: int cbf_require_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION -cbf_get_overload sets *overload to the overload value for element -number element_number. +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. 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. +handle CBF handle. categoryname The name of the category to +find. 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)); - } +SEE ALSO +")require_category; + void require_category(const char* arg){ + cbf_failnez(cbf_require_category(self,arg));} -/* cfunc cbf_remove_category pyfunc remove_category - arg cbf_handle handle */ +/* cfunc cbf_require_column pyfunc require_column + arg cbf_handle handle arg const char *columnname */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_remove_category (cbf_handle handle); +C prototype: int cbf_require_column (cbf_handle handle, + const char *columnname); CBFLib documentation: DESCRIPTION -cbf_remove_category deletes the current category. -The current category becomes undefined. +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. +handle CBF handle. columnname The name of column to find. 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));} +")require_column; + void require_column(const char* arg){ + cbf_failnez(cbf_require_column(self,arg));} %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 : +Returns : String Name +*args : String columnnanme,String Default -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_require_column_value (cbf_handle handle, + const char *columnname, const char **value, + const char *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 *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. 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. 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 -")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; +")require_column_value; - 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; - - } + 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 : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast +Returns : Int Value +*args : String Columnvalue,Int default -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_column_integervalue (cbf_handle handle, + const char *columnname, int *number, + const int 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 -")get_image_sf_as_string; +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; -// 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 +%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 : Float defaultvalue +*args : String columnname,Float Value - 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; - } +C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + const char *columnname, double *number, + const double defaultvalue); -/* cfunc cbf_get_wavelength pyfunc get_wavelength - arg cbf_handle handle arg double *wavelength */ +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 : double +Returns : CBFHandle dictionary *args : -C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); +C prototype: int cbf_get_dictionary (cbf_handle handle, + cbf_handle * dictionary); CBFLib documentation: DESCRIPTION -cbf_get_wavelength sets *wavelength to the current wavelength in AA. +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. wavelength Pointer to the destination. +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_wavelength; - double get_wavelength(void){ - double result; - cbf_failnez(cbf_get_wavelength(self,&result)); - return result;} - -/* cfunc cbf_force_new_category pyfunc force_new_category - arg cbf_handle handle arg const char *categoryname */ +")get_dictionary; +cbf_handle get_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_get_dictionary(self,&temp)); + return temp; +} %feature("autodoc", " -Returns : string -*args : +Returns : +*args : CBFHandle dictionary -C prototype: int cbf_force_new_category (cbf_handle handle, - const char *categoryname); +C prototype: int cbf_set_dictionary (cbf_handle handle, + cbf_handle dictionary_in); 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_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. categoryname The name of the new -category. +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 -")force_new_category; - void force_new_category(const char* arg){ - cbf_failnez(cbf_force_new_category(self,arg));} +---------------------------------------------------------------------- +")set_dictionary; + +void set_dictionary(cbf_handle other){ + cbf_failnez(cbf_set_dictionary(self,other)); +} %feature("autodoc", " -Returns : Float start,Float increment -*args : String axis_id +Returns : String categoryroot +*args : String categoryname -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_find_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); 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_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. 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 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_axis_setting; +")find_category_root; -%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)); - } +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 offset1,Float offset2,Float offset3 -*args : String axis_id +Returns : +*args : String categoryname,String categoryroot -C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, - double *offset1, double *offset2, double *offset3); +C prototype: int cbf_set_category_root (cbf_handle handle, + const char* categoryname_in, const char*categoryroot); 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_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. 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 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_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)); - } - -/* cfunc cbf_count_rows pyfunc count_rows - arg cbf_handle handle arg unsigned int *rows */ +")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 : Integer -*args : +Returns : String categoryroot +*args : String Categoryname -C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); +C prototype: int cbf_require_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); CBFLib documentation: DESCRIPTION -cbf_count_rows puts the number of rows in the current category in -*rows . +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. 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;} -%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; +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; - void set_timestamp(double time, int timezone, double precision){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); - } +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 : Float defaultvalue -*args : String columnname,Float Value +Returns : String tagroot +*args : String tagname -C prototype: int cbf_require_column_doublevalue (cbf_handle handle, - const char *columnname, double *number, - const double defaultvalue); +C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); 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_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 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. 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 -")require_column_doublevalue; +---------------------------------------------------------------------- +")find_tag_root; -%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)); - } +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 Name -*args : String columnnanme,String Default +Returns : +*args : String tagname,String tagroot_in -C prototype: int cbf_require_column_value (cbf_handle handle, - const char *columnname, const char **value, - const char *defaultvalue); +C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + const char*tagroot_in); 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_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 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. 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 -")require_column_value; +---------------------------------------------------------------------- +")set_tag_root; - 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_tag_root(const char* tagname, const char* tagroot_in){ + cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); } - -/* cfunc cbf_next_category pyfunc next_category - arg cbf_handle handle */ - %feature("autodoc", " -Returns : -*args : +Returns : String tagroot +*args : String tagname -C prototype: int cbf_next_category (cbf_handle handle); +C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); 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_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. +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 -")next_category; - void next_category(void){ - cbf_failnez(cbf_next_category(self));} +---------------------------------------------------------------------- +")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 : -*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding +Returns : String categoryname +*args : String tagname -C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, - int ciforcbf, int flags, int encoding); +C prototype: int cbf_find_tag_category (cbf_handle handle, + const char* tagname, const char** categoryname); 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; +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; - 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); - } - } + + 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 : String -*args : String axis_id +Returns : +*args : String tagname,String categoryname_in -C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, - cbf_axis_type *axis_type); +C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + const char* categoryname_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_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. 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. 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. ---------------------------------------------------------------------- -")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_count_columns pyfunc count_columns - arg cbf_handle handle arg unsigned int *columns */ +")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 : Integer -*args : +Returns : +*args : String filename -C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); +C prototype: int cbf_read_template (cbf_handle handle, FILE *file); CBFLib documentation: DESCRIPTION -cbf_count_columns puts the number of columns in the current category -in *columns. +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. columns Pointer to the destination column -count. +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 -")count_columns; - unsigned int count_columns(void){ - unsigned int result; - cbf_failnez(cbf_count_columns(self,&result)); - return result;} +---------------------------------------------------------------------- +")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_get_diffrn_id pyfunc get_diffrn_id + arg cbf_handle handle arg const char **diffrn_id */ + %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 : string -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); +C prototype: int cbf_get_diffrn_id (cbf_handle handle, + const char **diffrn_id); 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_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. 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. 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 -")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 */ +---------------------------------------------------------------------- +")get_diffrn_id; + const char* get_diffrn_id(void){ + const char* result; + cbf_failnez(cbf_get_diffrn_id(self, &result)); + return result;} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; +/* cfunc cbf_set_diffrn_id pyfunc set_diffrn_id + arg cbf_handle handle arg const char *diffrn_id */ - 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 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 : string +*args : -C prototype: int cbf_set_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); +C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); 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_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. ubmatric Source or destination array of 9 -doubles giving the orientation matrix parameters. +handle CBF handle. diffrn_id ASCII value. 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)); - } +")set_diffrn_id; + void set_diffrn_id(const char* arg){ + cbf_failnez(cbf_set_diffrn_id(self,arg));} -/* cfunc cbf_count_categories pyfunc count_categories - arg cbf_handle handle arg unsigned int *categories */ +/* cfunc cbf_get_crystal_id pyfunc get_crystal_id + arg cbf_handle handle arg const char **crystal_id */ %feature("autodoc", " -Returns : Integer -*args : +Returns : +*args : string -C prototype: int cbf_count_categories (cbf_handle handle, - unsigned int *categories); +C prototype: int cbf_get_crystal_id (cbf_handle handle, + const char **crystal_id); CBFLib documentation: DESCRIPTION -cbf_count_categories puts the number of categories in the current -data block in *categories. +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. categories Pointer to the destination -category count. +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 -")count_categories; - unsigned int count_categories(void){ - unsigned int result; - cbf_failnez(cbf_count_categories(self,&result)); - return result;} +---------------------------------------------------------------------- +")get_crystal_id; + const char* get_crystal_id(void){ + const char* result; + cbf_failnez(cbf_get_crystal_id(self, &result)); + return result;} -/* cfunc cbf_rewind_datablock pyfunc rewind_datablock - arg cbf_handle handle */ +/* cfunc cbf_set_crystal_id pyfunc set_crystal_id + arg cbf_handle handle arg const char *crystal_id */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_rewind_datablock (cbf_handle handle); +C prototype: int cbf_set_crystal_id (cbf_handle handle, + const char *crystal_id); 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_set_crystal_id sets the \"diffrn.crystal_id \" entry to the +ASCII value crystal_id. ARGUMENTS -handle CBF handle. +handle CBF handle. crystal_id ASCII value. 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));} +---------------------------------------------------------------------- +")set_crystal_id; + void set_crystal_id(const char* arg){ + cbf_failnez(cbf_set_crystal_id(self,arg));} -/* cfunc cbf_remove_row pyfunc remove_row - arg cbf_handle handle */ +/* cfunc cbf_get_wavelength pyfunc get_wavelength + arg cbf_handle handle arg double *wavelength */ %feature("autodoc", " -Returns : +Returns : double *args : -C prototype: int cbf_remove_row (cbf_handle handle); +C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); 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. +cbf_get_wavelength sets *wavelength to the current wavelength in Å. ARGUMENTS -handle CBF handle. +handle CBF handle. wavelength Pointer to the destination. 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));} +---------------------------------------------------------------------- +")get_wavelength; + double get_wavelength(void){ + double result; + cbf_failnez(cbf_get_wavelength(self,&result)); + return result;} -/* cfunc cbf_rewind_row pyfunc rewind_row - arg cbf_handle handle */ +/* cfunc cbf_set_wavelength pyfunc set_wavelength + arg cbf_handle handle arg double wavelength */ %feature("autodoc", " -Returns : +Returns : double wavelength *args : -C prototype: int cbf_rewind_row (cbf_handle handle); +C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); 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_set_wavelength sets the current wavelength in Å to wavelength. ARGUMENTS -handle CBF handle. +handle CBF handle. wavelength Wavelength in Å. 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));} +---------------------------------------------------------------------- +")set_wavelength; + void set_wavelength(double wavelength){ + cbf_failnez(cbf_set_wavelength(self,wavelength));} %feature("autodoc", " -Returns : pycbf goniometer object +Returns : float polarizn_source_ratio,float polarizn_source_norm *args : -C prototype: int cbf_construct_goniometer (cbf_handle handle, - cbf_goniometer *goniometer); +C prototype: int cbf_get_polarization (cbf_handle handle, + double *polarizn_source_ratio, + double *polarizn_source_norm); 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_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. goniometer Pointer to the destination -goniometer handle. +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. ---------------------------------------------------------------------- -")construct_goniometer; - - cbf_goniometer construct_goniometer(){ - cbf_goniometer goniometer; - cbf_failnez(cbf_construct_goniometer(self,&goniometer)); - return goniometer; - } - -/* cfunc cbf_reset_saveframe pyfunc reset_saveframe - arg cbf_handle handle */ +")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 : +*args : Float polarizn_source_ratio,Float polarizn_source_norm -C prototype: int cbf_reset_saveframe (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_datablock deletes all categories from the current data -block. cbf_reset_saveframe deletes all categories from the current -save frame. +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 -")reset_saveframe; - void reset_saveframe(void){ - cbf_failnez(cbf_reset_saveframe(self));} +---------------------------------------------------------------------- +")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 : int compression,int binary_id,int elsize,int elements +Returns : Float div_x_source,Float div_y_source,Float div_x_y_source *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_get_divergence (cbf_handle handle, double *div_x_source, + double *div_y_source, double *div_x_y_source); 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_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. 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. 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 -")get_realarrayparameters; - -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elements} get_realarrayparameters; - +---------------------------------------------------------------------- +")get_divergence; - 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; - } +%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 : Float pixel_size -*args : Int element_number,Int axis_number +Returns : +*args : Float div_x_source,Float div_y_source,Float div_x_y_source -C prototype: int cbf_get_pixel_size (cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); +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_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_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. 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. 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. ---------------------------------------------------------------------- -")get_pixel_size; +")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_count_elements pyfunc count_elements + arg cbf_handle handle arg unsigned int *elements */ -%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 : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, - Float gammastar +Returns : Integer *args : -C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_count_elements (cbf_handle handle, + unsigned int *elements); 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. +cbf_count_elements sets *elements to the number of detector elements. 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. +handle CBF handle. elements Pointer to the destination count. 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]; - } +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;} + +/* 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);} %feature("autodoc", " -Returns : doubleArray cell -*args : +Returns : String +*args : Integer element_number -C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_get_element_id (cbf_handle handle, + unsigned int element_number, const char **element_id); 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. +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. 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. +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. No errors is -returned for missing values if the \"cell \" category exists. -SEE ALSO -")get_reciprocal_cell; +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_element_id; -%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]; - } + 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 : Float gain,Float gain_esd *args : C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, - double *gain, double *gain_esd); + double *gain, double *gain_esd); CBFLib documentation: DESCRIPTION @@ -5121,618 +4310,668 @@ Returns an error code on failure or 0 for success. double *gain_esd){ cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); } +%feature("autodoc", " +Returns : +*args : Float gain,Float gain_esd -/* cfunc cbf_category_name pyfunc category_name - arg cbf_handle handle arg const char **categoryname */ +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 : -*args : string +Returns : Float overload +*args : Integer element_number -C prototype: int cbf_category_name (cbf_handle handle, - const char **categoryname); +C prototype: int cbf_get_overload (cbf_handle handle, + unsigned int element_number, double *overload); 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_get_overload sets *overload to the overload value for element +number element_number. ARGUMENTS -handle CBF handle. categoryname Pointer to the destination -category name pointer. +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 -")category_name; - const char* category_name(void){ - const char* result; - cbf_failnez(cbf_category_name(self, &result)); - return result;} +---------------------------------------------------------------------- +")get_overload; -/* cfunc cbf_force_new_saveframe pyfunc force_new_saveframe - arg cbf_handle handle arg const char *saveframename */ +%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 : +*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 : string +Returns : Float time *args : -C prototype: int cbf_force_new_saveframe (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_get_integration_time (cbf_handle handle, + unsigned int reserved, double *time); 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_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. 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. time Pointer to the destination time. 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));} +---------------------------------------------------------------------- +")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 : String tagroot -*args : String tagname +Returns : +*args : Float time -C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); +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 : 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. +")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)); + } +%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 in +")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 : 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_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_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. 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. 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. ---------------------------------------------------------------------- -")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; -} +")get_datestamp; -/* 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 *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 : +*args : int year,int month,int day,int hour,int minute,double second, + int timezone,Float precision - void get_element_number(void){ - cbf_failnez(CBF_NOTIMPLEMENTED);} +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); -/* cfunc cbf_rewind_saveframe pyfunc rewind_saveframe - arg cbf_handle handle */ +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 +")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 : +*args : Integer timezone -C prototype: int cbf_rewind_saveframe (cbf_handle handle); +C prototype: int cbf_set_current_timestamp (cbf_handle handle, + unsigned int reserved, int timezone); 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_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. type CBF handle. +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. -SEE ALSO -")rewind_saveframe; - void rewind_saveframe(void){ - cbf_failnez(cbf_rewind_saveframe(self));} +---------------------------------------------------------------------- +")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 : (Binary)String -*args : +Returns : size_t ndim1,size_t ndim2 +*args : Integer element_number -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_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, 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_realarray_as_string; +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; -// 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 +%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 - 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)); +C prototype: int cbf_get_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimslow); - 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)); +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; - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*elements; - *s = (char *) array; - } +%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 : -*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding +Returns : size_t ndimslow,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, - int readable, int ciforcbf, int flags, int encoding); +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_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(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_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; } - } - -/* cfunc cbf_reset_category pyfunc reset_category - arg cbf_handle handle */ - %feature("autodoc", " -Returns : -*args : +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_reset_category (cbf_handle handle); +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_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));} +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 : -*args : String filename,Integer headers +Returns : size_t ndimfast,size_t ndimmid,size_t ndimslow +*args : Integer element_number -C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); +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_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; +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; - 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); +%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; } - else{ - cbf_failnez(cbf_read_file(self, stream, headers)); - } - } %feature("autodoc", " -Returns : -*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_set_bin_sizes(cbf_handle handle, - unsigned int element_number, double slowbinsize_in, - double fastbinsize_in); +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_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; +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; - 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)); - } +%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 : pycbf detector object -*args : Integer element_number +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast -C prototype: int cbf_construct_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +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_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_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; - cbf_detector construct_detector(unsigned int element_number){ - cbf_detector detector; - cbf_failnez(cbf_construct_detector(self,&detector,element_number)); - return detector; - } +// 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, + 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 : int compression,int binary_id,(binary) String data,int elsize, - int elements +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow -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_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_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 */ +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; -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; +// 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_realarray(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elements){ - /* safety check on args */ - size_t els, ele; + 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*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); - } - } + 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 : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimfast,int dimmid,int dimslow, - int padding +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast -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_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_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; +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; - 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); - } - } +// 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, + 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 elsign,int ndimslow,int ndimmid, - int ndimfast +*args : int element_number,int elsize,int ndimslow,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); +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 +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, +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. @@ -5746,310 +4985,439 @@ 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; +")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_3d_image_as_string; + get_real_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 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_3d_image(self, + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image(self, reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); }else{ cbf_failnez(CBF_ALLOC); } - *slen = elsize*ndimfast*ndimmid*ndimslow; + *slen = elsize*ndimfast*ndimslow; *s = (char *) array; } %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 : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimfast,int dimmid,int dimslow,int padding -*args : +Returns : (Binary)String +*args : int element_number,int elsize,int ndimfast,int ndimslow -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); +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_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; +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; -%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 +%{ +#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_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; - - } + 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 : pycbf detector object -*args : Integer element_number +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimfast -C prototype: int cbf_require_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +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_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; - } +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; -/* cfunc cbf_remove_datablock pyfunc remove_datablock - arg cbf_handle handle */ +// 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, + 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 : -*args : +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast -C prototype: int cbf_remove_datablock (cbf_handle handle); +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_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));} +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; -/* cfunc cbf_next_row pyfunc next_row - arg cbf_handle handle */ +// 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 : -*args : +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, + int ndimslow -C prototype: int cbf_next_row (cbf_handle handle); +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_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));} +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; -/* cfunc cbf_remove_column pyfunc remove_column - arg cbf_handle handle */ +// 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, + 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 : -*args : +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast -C prototype: int cbf_remove_column (cbf_handle handle); +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_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));} +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; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} + +// 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 : String axis_id,Float start,Float increment +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast -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_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_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_3d_image_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 +%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 + + 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 : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimfast +*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow -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); +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 +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, +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. @@ -6063,152 +5431,56 @@ 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; +")get_real_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_real_image_sf_as_string; + get_real_3d_image_fs_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 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*ndimslow))) { - cbf_failnez (cbf_get_real_image_sf(self, + 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) ndimslow, (size_t)ndimfast)); + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); }else{ cbf_failnez(CBF_ALLOC); } - *slen = elsize*ndimfast*ndimslow; + *slen = elsize*ndimfast*ndimmid*ndimslow; *s = (char *) array; } %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; - } -%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 : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow +*args : int element_number,int elsize,int ndimslow,int ndimmid,int 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); +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 +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, +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. @@ -6222,482 +5494,1040 @@ 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; +")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_image_fs_as_string; + get_real_3d_image_sf_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 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*ndimslow))) { - cbf_failnez (cbf_get_image_fs(self, + 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, elsign, - (size_t) ndimfast, (size_t)ndimslow)); + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); }else{ cbf_failnez(CBF_ALLOC); } - *slen = elsize*ndimfast*ndimslow; + *slen = elsize*ndimfast*ndimmid*ndimslow; *s = (char *) array; } - -/* 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_next_datablock pyfunc next_datablock - arg cbf_handle handle */ - %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_next_datablock (cbf_handle handle); +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_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. +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 -")next_datablock; - void next_datablock(void){ - cbf_failnez(cbf_next_datablock(self));} +---------------------------------------------------------------------- +")set_image; -/* cfunc cbf_get_value pyfunc get_value - arg cbf_handle handle arg const char **value */ + /* 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 : string +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimslow -C prototype: int cbf_get_value (cbf_handle handle, const char **value); +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_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_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. value Pointer to the destination -value pointer. defaultvalue Default value character string. +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_value; - const char* get_value(void){ - const char* result; - cbf_failnez(cbf_get_value(self, &result)); - return result;} +---------------------------------------------------------------------- +")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 : 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 : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast -C prototype: int cbf_get_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); +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_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_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. ubmatric Source or destination array of 9 -doubles giving the orientation matrix parameters. +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_orientation_matrix; +")set_image_sf; -%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] ; + /* 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 : CBFHandle dictionary -*args : +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast -C prototype: int cbf_get_dictionary (cbf_handle handle, - cbf_handle * dictionary); +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_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_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. 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. 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_dictionary; +")set_real_image; -cbf_handle get_dictionary(){ - cbf_handle temp; - cbf_failnez(cbf_get_dictionary(self,&temp)); - return temp; -} + /* 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_column_name pyfunc column_name - arg cbf_handle handle arg const char **columnname */ +%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 : -*args : string +*args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimslow -C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); +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_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_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 Pointer to the -destination column name pointer. newcolumnname New column 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 -")column_name; - const char* column_name(void){ - const char* result; - cbf_failnez(cbf_column_name(self, &result)); - return result;} +---------------------------------------------------------------------- +")set_real_image_fs; -/* cfunc cbf_require_category pyfunc require_category - arg cbf_handle handle arg const char *categoryname */ + /* 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 : string -*args : +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast -C prototype: int cbf_require_category (cbf_handle handle, - const char *categoryname); +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_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. +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 The name of the category 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 -")require_category; - void require_category(const char* arg){ - cbf_failnez(cbf_require_category(self,arg));} - -/* cfunc cbf_remove_saveframe pyfunc remove_saveframe - arg cbf_handle handle */ +---------------------------------------------------------------------- +")set_real_image_sf; -%feature("autodoc", " -Returns : -*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_remove_saveframe (cbf_handle handle); +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image_sf; -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));} + 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); + } + } %feature("autodoc", " Returns : -*args : Float polarizn_source_ratio,Float polarizn_source_norm +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast -C prototype: int cbf_set_polarization (cbf_handle handle, - double polarizn_source_ratio, - double polarizn_source_norm); +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_polarization sets the source polarization to the values -specified by polarizn_source_ratio and polarizn_source_norm. +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. polarizn_source_ratio New value -of polarizn_source_ratio. polarizn_source_norm New value of -polarizn_source_norm. +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_polarization; +")set_3d_image; - void set_polarization (double polarizn_source_ratio, - double polarizn_source_norm){ - cbf_failnez(cbf_set_polarization(self, - polarizn_source_ratio, - polarizn_source_norm)); - } + /* 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_set_wavelength pyfunc set_wavelength - arg cbf_handle handle arg double wavelength */ +%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 : double wavelength -*args : +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_wavelength (cbf_handle handle, double wavelength); +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_wavelength sets the current wavelength in AA to wavelength. +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. wavelength Wavelength in AA. +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_wavelength; - void set_wavelength(double wavelength){ - cbf_failnez(cbf_set_wavelength(self,wavelength));} - -/* cfunc cbf_row_number pyfunc row_number - arg cbf_handle handle arg unsigned int *row */ +")set_3d_image_fs; -%feature("autodoc", " -Returns : Integer -*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_row_number (cbf_handle handle, unsigned int *row); +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; -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;} + 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 : Float vector1,Float vector2,Float vector3 -*args : String axis_id +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast -C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, - double *vector1, double *vector2, double *vector3); +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_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_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. 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. 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_axis_vector; +")set_3d_image_sf; -%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)); - } + /* 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_get_doublevalue pyfunc get_doublevalue - arg cbf_handle handle arg double *number */ +%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 : double -*args : +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast -C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); +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_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_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 Pointer to the destination -number. defaultvalue default number 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 -")get_doublevalue; - double get_doublevalue(void){ - double result; - cbf_failnez(cbf_get_doublevalue(self,&result)); - return result;} +---------------------------------------------------------------------- +")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); + } + } %feature("autodoc", " Returns : -*args : Integer timezone +*args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimmid,int dimslow -C prototype: int cbf_set_current_timestamp (cbf_handle handle, - unsigned int reserved, int timezone); +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_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. +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. -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. +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_current_timestamp; +")set_real_3d_image_fs; - void set_current_timestamp(int timezone){ + /* 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; - reserved = 0; - cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); + 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 : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast + 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); +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. +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. +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. +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 @@ -6735,319 +6565,494 @@ dimension. ndimmid Second slowest array dimension. ndimfast 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; +")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 : 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; - 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); +%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 : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3 -*args : String axis_id +Returns : String +*args : String axis_id,Integer ancestor_index -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); +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_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_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. 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. 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_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_rewind_category pyfunc rewind_category - arg cbf_handle handle */ +")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 : -*args : +Returns : String +*args : String axis_id -C prototype: int cbf_rewind_category (cbf_handle handle); +C prototype: int cbf_get_axis_depends_on (cbf_handle handle, + const char *axis_id, const char * *depends_on); 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_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. type 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 -")rewind_category; - void rewind_category(void){ - cbf_failnez(cbf_rewind_category(self));} -%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; +---------------------------------------------------------------------- +")get_axis_depends_on; - 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 : Float slowbinsize,Float fastbinsize -*args : Integer element_number + 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 : String axis_id -C prototype: int cbf_get_bin_sizes(cbf_handle handle, - unsigned int element_number, double * slowbinsize, - double * fastbinsize); +C prototype: int cbf_get_axis_equipment (cbf_handle handle, + const char *axis_id, const char * *equipment); 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_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. 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. 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_bin_sizes; +")get_axis_equipment; -%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)); - } + 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,String byteorder,int dimslow,int dimmid, - int dimfast,int padding +Returns : String +*args : String axis_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); +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_wdims_sf; +---------------------------------------------------------------------- +")get_axis_equipment_component; - /* 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 */ + 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 : Float offset1,Float offset2,Float offset3 +*args : String axis_id -%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; +C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, + double *offset1, double *offset2, double *offset3); - 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); +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 : String tagroot -*args : String tagname +Returns : Float +*args : String axis_id -C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); +C prototype: int cbf_get_axis_rotation (cbf_handle handle, + const char *axis_id, double *rotation); 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. ---------------------------------------------------------------------- -")require_tag_root; +")get_axis_rotation; -const char* require_tag_root(const char* tagname){ - const char* result; - cbf_failnez(cbf_require_tag_root(self,tagname,&result)); - return result; - } +%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)); + } %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); +C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, + const char *axis_id, const char * *rotation_axis); CBFLib documentation: DESCRIPTION @@ -7099,138 +7104,155 @@ vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_axis_equipment_component; +")get_axis_rotation_axis; - 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; + 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 : Float pixel_size -*args : Int element_number,Int axis_number +Returns : Float start,Float increment +*args : String axis_id -C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); +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_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_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. 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. 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_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 : -*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)); - } -%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; +")get_axis_setting; - void set_datestamp(int year, int month, int day, int hour, - int minute, double second, int timezone, - double precision){ +%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_set_datestamp(self,reserved, - year,month,day,hour,minute,second,timezone,precision)); + reserved = 0; + cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, + start,increment)); } %feature("autodoc", " -Returns : -*args : Float time +Returns : String +*args : String axis_id -C prototype: int cbf_set_integration_time (cbf_handle handle, - unsigned int reserved, double time); +C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); 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. +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 Integration time in seconds. +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_integration_time; +")get_axis_type; - void set_integration_time(double time){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_integration_time(self,reserved,time)); + 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 : String +Returns : Float vector1,Float vector2,Float vector3 *args : String axis_id -C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, - const char *axis_id, const char * *rotation_axis); +C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, + double *vector1, double *vector2, double *vector3); CBFLib documentation: DESCRIPTION @@ -7282,367 +7304,518 @@ vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_axis_rotation_axis; +")get_axis_vector; - 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; +%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 : size_t ndim1,size_t ndim2 -*args : Integer element_number +Returns : +*args : String axis_id,Float start,Float increment -C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, - unsigned int element_number, size_t *ndimslow, - size_t *ndimfast); +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_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; +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; -%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; - void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + void set_axis_setting(const char *axis_id, + double start, double increment){ 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; + cbf_failnez(cbf_set_axis_setting(self,reserved, + axis_id,start,increment)); } +%feature("autodoc", " +Returns : pycbf goniometer object +*args : -/* cfunc cbf_delete_row pyfunc delete_row - arg cbf_handle handle arg unsigned int rownumber */ +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; + } %feature("autodoc", " -Returns : -*args : Integer +Returns : pycbf detector object +*args : Integer element_number -C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); +C prototype: int cbf_construct_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); 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_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. rownumber The number of the row to delete. +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 -")delete_row; - void delete_row(unsigned int arg){ - cbf_failnez(cbf_delete_row(self,arg));} +---------------------------------------------------------------------- +")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 : (Binary)String -*args : int element_number,int elsize,int ndimfast,int ndimslow +Returns : pycbf detector object +*args : Integer element_number -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); +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 : 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; + } +%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 : 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_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 -%{ -#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 +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; - 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; - } + 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 : -*args : CBFHandle dictionary +Returns : Float pixel_size +*args : Int element_number,Int axis_number -C prototype: int cbf_set_dictionary (cbf_handle handle, - cbf_handle dictionary_in); +C prototype: int cbf_get_pixel_size (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. ---------------------------------------------------------------------- -")set_dictionary; +")get_pixel_size; -void set_dictionary(cbf_handle other){ - cbf_failnez(cbf_set_dictionary(self,other)); -} +%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 : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, - int ndimslow +Returns : Float pixel_size +*args : Int element_number,Int axis_number -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_get_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); 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 +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; - 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; - } +%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 : int year,int month,int day,int hour,int minute,double second, - int timezone -*args : +Returns : Float pixel_size +*args : Int element_number,Int axis_number -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_get_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); 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_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. 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. 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_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_crystal_id pyfunc get_crystal_id - arg cbf_handle handle arg const char **crystal_id */ +")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)); + } %feature("autodoc", " Returns : -*args : string +*args : Int element_number,Int axis_number,Float pixel size -C prototype: int cbf_get_crystal_id (cbf_handle handle, - const char **crystal_id); +C prototype: int cbf_set_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, double psize); 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_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. crystal_id Pointer to the destination -value pointer. +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. ---------------------------------------------------------------------- -")get_crystal_id; - const char* get_crystal_id(void){ - const char* result; - cbf_failnez(cbf_get_crystal_id(self, &result)); - return result;} +")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 : size_t ndimslow,size_t ndimfast -*args : Integer element_number +Returns : +*args : Int element_number,Int axis_number,Float pixel size -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_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, double psize); 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; - } - -/* cfunc cbf_require_datablock pyfunc require_datablock - arg cbf_handle handle arg const char *datablockname */ +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. +---------------------------------------------------------------------- +")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 -*args : +Returns : +*args : Int element_number,Int axis_number,Float pixel size -C prototype: int cbf_require_datablock (cbf_handle handle, - const char *datablockname); +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_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_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. datablockname The name of the data -block to find or create. +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. -SEE ALSO -")require_datablock; - void require_datablock(const char* arg){ - cbf_failnez(cbf_require_datablock(self,arg));} +---------------------------------------------------------------------- +")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)); + } %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] ); + 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 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 +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 AAngstroms, cell_esd[3:5] to the double values of the -estimated standard deviations of the the cell angles a, b and g in +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. @@ -7679,16 +7852,16 @@ Returns : doubleArray cell *args : C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[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 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 +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 AAngstroms, cell_esd[3:5] to the double values of the -estimated standard deviations of the the cell angles a, b and g in +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. @@ -7722,641 +7895,551 @@ SEE ALSO } %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_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));} - -/* cfunc cbf_new_saveframe pyfunc new_saveframe - arg cbf_handle handle arg const char *saveframename */ - -%feature("autodoc", " -Returns : string -*args : +*args : double cell[6] -C prototype: int cbf_new_saveframe (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); 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_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. datablockname The name of the new data -block. saveframename The name of the new save frame. +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 -")new_saveframe; - void new_saveframe(const char* arg){ - cbf_failnez(cbf_new_saveframe(self,arg));} +")set_unit_cell; + + void set_unit_cell(double cell[6]) { + cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); + } %feature("autodoc", " -Returns : (Binary)String -*args : +Returns : +*args : double cell_esd[6] -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_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); 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_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. 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. 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 -")get_integerarray_as_string; - -// Ensure we free the local temporary - -%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)); +Returns an error code on failure or 0 for success. +SEE ALSO +")set_unit_cell_esd; - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*elements; - *s = (char *) array; - } + void set_unit_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); + } %feature("autodoc", " -Returns : String categoryroot -*args : String categoryname +Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar +*args : -C prototype: int cbf_find_category_root (cbf_handle handle, - const char* categoryname, const char** categoryroot); +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); 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_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. 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. 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. ----------------------------------------------------------------------- -")find_category_root; +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; -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 *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 : -*args : Integer element_number,Float overload +Returns : doubleArray cell +*args : -C prototype: int cbf_set_overload (cbf_handle handle, - unsigned int element_number, double overload); +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_set_overload sets the overload value of element number -element_number to overload. +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. 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. 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. ----------------------------------------------------------------------- -")set_overload; +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; - void set_overload(unsigned int element_number, double overload){ - cbf_failnez(cbf_set_overload(self,element_number,overload)); - } +%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 Value -*args : String Columnvalue,Int default +Returns : +*args : double cell[6] -C prototype: int cbf_require_column_integervalue (cbf_handle handle, - const char *columnname, int *number, - const int defaultvalue); +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); 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_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. 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. 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 -")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)); - } - -/* cfunc cbf_new_datablock pyfunc new_datablock - arg cbf_handle handle arg const char *datablockname */ +SEE ALSO +")set_reciprocal_cell; + void set_reciprocal_cell(double cell[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + } %feature("autodoc", " -Returns : string -*args : +Returns : +*args : double cell_esd[6] -C prototype: int cbf_new_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); 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_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. datablockname The name of the new data -block. saveframename The name of the new save frame. +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 -")new_datablock; - void new_datablock(const char* arg){ - cbf_failnez(cbf_new_datablock(self,arg));} +")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 : Float time +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_integration_time (cbf_handle handle, - unsigned int reserved, double *time); +C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); 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_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. reserved Unused. Any value other than 0 is -invalid. time Pointer to the destination time. +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_integration_time; +")get_orientation_matrix; -%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; +%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 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_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_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. 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. -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_orientation_matrix; - 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_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_reset_datablocks pyfunc reset_datablocks - arg cbf_handle handle */ - %feature("autodoc", " -Returns : -*args : +Returns : Float slowbinsize,Float fastbinsize +*args : Integer element_number -C prototype: int cbf_reset_datablocks (cbf_handle handle); +C prototype: int cbf_get_bin_sizes(cbf_handle handle, + unsigned int element_number, double * slowbinsize, + double * fastbinsize); CBFLib documentation: DESCRIPTION -cbf_reset_datablocks deletes all categories from all data blocks. -The current data block does not change. +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. +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. -SEE ALSO -")reset_datablocks; - void reset_datablocks(void){ - cbf_failnez(cbf_reset_datablocks(self));} - -/* cfunc cbf_reset_datablock pyfunc reset_datablock - arg cbf_handle handle */ +---------------------------------------------------------------------- +")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)); + } %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 : size_t ndimfast,size_t ndimslow -*args : Integer element_number +*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in -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_set_bin_sizes(cbf_handle handle, + unsigned int element_number, double slowbinsize_in, + double fastbinsize_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_fs; +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; -%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; - } + 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 : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement -*args : +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_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_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_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_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. 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. 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 -")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_axis_poise; -/* cfunc cbf_select_datablock pyfunc select_datablock - arg cbf_handle handle arg unsigned int datablock */ + %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 : Integer +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3 +*args : String axis_id -C prototype: int cbf_select_datablock (cbf_handle handle, - unsigned int datablock); +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_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_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. datablock Number of the data block to -select. +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 -")select_datablock; - void select_datablock(unsigned int arg){ - cbf_failnez(cbf_select_datablock(self,arg));} +---------------------------------------------------------------------- +")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)); + } + }; // End of cbf_handle_struct diff --git a/pycbf/linux.sh b/pycbf/linux.sh index 52490e63..7ea49921 100644 --- a/pycbf/linux.sh +++ b/pycbf/linux.sh @@ -1,10 +1,9 @@ nuweb pycbf -latex pycbf -nuweb pycbf -latex pycbf -dvipdfm pycbf +pdflatex pycbf +pdflatex pycbf nuweb pycbf +pdflatex pycbf lynx -dump CBFlib.html > CBFlib.txt python make_pycbf.py swig -python pycbf.i diff --git a/pycbf/make_pycbf.py b/pycbf/make_pycbf.py index 90c9a0d0..06a539f7 100644 --- a/pycbf/make_pycbf.py +++ b/pycbf/make_pycbf.py @@ -1,3 +1,4 @@ +from re import match print("\\begin{verbatim}") print("This output comes from make_pycbf.py which generates the wrappers") @@ -81,7 +82,7 @@ continue if line.find("#include")>=0: # why? continue - if line.find("int cbf_")>=0: # We found a function + if match("^\\s*int cbf_", line): # We found a function # keep going up to DESCRIPTION prototypes+=""+lines[i].rstrip()+" " # print(lines[i].rstrip()) diff --git a/pycbf/make_pycbf.w b/pycbf/make_pycbf.w index e3a14f41..8e945337 100644 --- a/pycbf/make_pycbf.w +++ b/pycbf/make_pycbf.w @@ -66,8 +66,9 @@ 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 -@{ +@O make_pycbf.py -i -t +@{from re import match + 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") @@ -150,7 +151,7 @@ while i=0: # why? continue - if line.find("int cbf_")>=0: # We found a function + if match("^\\s*int cbf_", line): # We found a function # keep going up to DESCRIPTION prototypes+=""+lines[i].rstrip()+" " # print(lines[i].rstrip()) diff --git a/pycbf/pycbf.aux b/pycbf/pycbf.aux deleted file mode 100644 index 925aba8d..00000000 --- a/pycbf/pycbf.aux +++ /dev/null @@ -1,57 +0,0 @@ -\relax -\providecommand\hyper@newdestlabel[2]{} -\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} -\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined -\global\let\oldnewlabel\newlabel -\gdef\newlabel#1#2{\newlabelxx{#1}#2} -\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} -\AtEndDocument{\ifx\hyper@anchor\@undefined -\let\newlabel\oldnewlabel -\fi} -\fi} -\global\let\hyper@last\relax -\gdef\HyperFirstAtBeginDocument#1{#1} -\providecommand*\HyPL@Entry[1]{} -\HyPL@Entry{0<>} -\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{2}{section.1}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {2}Installation prerequisites}{3}{section.2}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3}\protected@file@percent } -\newlabel{scrap1}{{3}{3}{Generating the c interface - the SWIG file}{section.3}{}} -\newlabel{scrap2}{{3}{3}{Generating the c interface - the SWIG file}{section.3}{}} -\newlabel{scrap3}{{3}{4}{Generating the c interface - the SWIG file}{section.3}{}} -\newlabel{scrap4}{{3}{4}{Generating the c interface - the SWIG file}{section.3}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Exceptions}{5}{subsection.3.1}\protected@file@percent } -\newlabel{scrap5}{{3.1}{5}{Exceptions}{subsection.3.1}{}} -\newlabel{scrap6}{{3.1}{5}{Exceptions}{subsection.3.1}{}} -\newlabel{scrap7}{{3.1}{9}{Exceptions}{subsection.3.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Exceptions}{10}{subsection.3.2}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {4}Docstrings}{10}{section.4}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {5}Wrappers}{10}{section.5}\protected@file@percent } -\newlabel{scrap8}{{5}{10}{Wrappers}{section.5}{}} -\@writefile{toc}{\contentsline {section}{\numberline {6}Building python extensions - the setup file}{10}{section.6}\protected@file@percent } -\newlabel{scrap9}{{6}{11}{Building python extensions - the setup file}{section.6}{}} -\@writefile{toc}{\contentsline {section}{\numberline {7}Building and testing the resulting package}{11}{section.7}\protected@file@percent } -\newlabel{scrap10}{{7}{11}{Building and testing the resulting package}{section.7}{}} -\newlabel{scrap11}{{7}{12}{Building and testing the resulting package}{section.7}{}} -\newlabel{scrap12}{{7}{12}{Building and testing the resulting package}{section.7}{}} -\@writefile{toc}{\contentsline {section}{\numberline {8}Debugging compiled extensions}{12}{section.8}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9}Things which are currently missing}{13}{section.9}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {10}Testing}{13}{section.10}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{13}{subsection.10.1}\protected@file@percent } -\newlabel{scrap13}{{10.1}{14}{Read a file based on cif2cbf.c}{subsection.10.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{15}{subsection.10.2}\protected@file@percent } -\newlabel{scrap14}{{10.2}{15}{Try to test the goniometer and detector}{subsection.10.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{15}{subsection.10.3}\protected@file@percent } -\newlabel{scrap15}{{10.3}{15}{Test cases for the generics}{subsection.10.3}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.4}Version of pycbf_test1 with write logic added}{17}{subsection.10.4}\protected@file@percent } -\newlabel{scrap16}{{10.4}{17}{Version of pycbf_test1 with write logic added}{subsection.10.4}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.5}Processing of XFEL axes}{18}{subsection.10.5}\protected@file@percent } -\newlabel{scrap17}{{10.5}{18}{Processing of XFEL axes}{subsection.10.5}{}} -\@writefile{toc}{\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{18}{section.11}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{19}{subsection.11.1}\protected@file@percent } -\newlabel{scrap18}{{11.1}{20}{Reading marccd headers}{subsection.11.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{21}{subsection.11.2}\protected@file@percent } -\newlabel{scrap19}{{11.2}{22}{Writing out cif files for fit2d/xmas}{subsection.11.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{23}{subsection.11.3}\protected@file@percent } -\newlabel{scrap20}{{11.3}{24}{A template cif file for the xmas beamline}{subsection.11.3}{}} -\gdef \@abspage@last{24} diff --git a/pycbf/pycbf.dvi b/pycbf/pycbf.dvi deleted file mode 100644 index 5f0aba3f..00000000 Binary files a/pycbf/pycbf.dvi and /dev/null differ diff --git a/pycbf/pycbf.log b/pycbf/pycbf.log deleted file mode 100644 index 1c9085da..00000000 --- a/pycbf/pycbf.log +++ /dev/null @@ -1,1479 +0,0 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=latex 2022.10.30) 8 FEB 2023 21:05 -entering extended mode - restricted \write18 enabled. - %&-line parsing enabled. -**pycbf -(./pycbf.tex -LaTeX2e <2022-06-01> patch level 5 -L3 programming layer <2022-10-26> -(/usr/local/texlive/2022/texmf-dist/tex/latex/base/article.cls -Document Class: article 2021/10/04 v1.4n Standard LaTeX document class -(/usr/local/texlive/2022/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) -) -\c@part=\count185 -\c@section=\count186 -\c@subsection=\count187 -\c@subsubsection=\count188 -\c@paragraph=\count189 -\c@subparagraph=\count190 -\c@figure=\count191 -\c@table=\count192 -\abovecaptionskip=\skip47 -\belowcaptionskip=\skip48 -\bibindent=\dimen138 -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR) - -(/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 2021/08/11 v1.11 sin cos tan (DPC) -) -(/usr/local/texlive/2022/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 107. - -(/usr/local/texlive/2022/texmf-dist/tex/latex/graphics-def/dvips.def -File: dvips.def 2022/09/22 v3.1e Graphics/color driver for dvips -\stockwidth=\dimen139 -\stockheight=\dimen140 -)) -(/usr/local/texlive/2022/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=\dimen141 -\@Rightmargin=\dimen142 -\@Topmargin=\dimen143 -\@Bottommargin=\dimen144 -) (/usr/local/texlive/2022/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty -Package: fancyhdr 2022/05/18 v4.0.3 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 -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/hyperref.sty -Package: hyperref 2022-09-22 v7.00t Hypertext links for LaTeX - -(/usr/local/texlive/2022/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty -Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/iftex/iftex.sty -Package: iftex 2022/02/03 v1.0f TeX engine tests -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty -Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO -) - -(/usr/local/texlive/2022/texmf-dist/tex/generic/infwarerr/infwarerr.sty -Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) -) -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 2022/05/29 v1.15 key=value parser (DPC) -\KV@toks@=\toks16 -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty -Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty -Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/pdfescape/pdfescape.sty -Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/hycolor/hycolor.sty -Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty -Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/auxhook/auxhook.sty -Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/nameref.sty -Package: nameref 2022-05-17 v2.50 Cross-referencing by name of section - -(/usr/local/texlive/2022/texmf-dist/tex/latex/refcount/refcount.sty -Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/gettitlestring/gettitlestring.s -ty -Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) - (/usr/local/texlive/2022/texmf-dist/tex/latex/kvoptions/kvoptions.sty -Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) -)) -\c@section@level=\count193 -) -\@linkdim=\dimen145 -\Hy@linkcounter=\count194 -\Hy@pagecounter=\count195 - -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/pd1enc.def -File: pd1enc.def 2022-09-22 v7.00t Hyperref: PDFDocEncoding definition (HO) -Now handling font encoding PD1 ... -... no UTF-8 mapping file for font encoding PD1 -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/intcalc/intcalc.sty -Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/etexcmds/etexcmds.sty -Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) -) -\Hy@SavedSpaceFactor=\count196 - -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/puenc.def -File: puenc.def 2022-09-22 v7.00t Hyperref: PDF Unicode definition (HO) -Now handling font encoding PU ... -... no UTF-8 mapping file for font encoding PU -) -Package hyperref Info: Option `bookmarks' set `true' on input line 4045. -Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 4045 -. -Package hyperref Info: Hyper figures OFF on input line 4162. -Package hyperref Info: Link nesting OFF on input line 4167. -Package hyperref Info: Hyper index ON on input line 4170. -Package hyperref Info: Plain pages OFF on input line 4177. -Package hyperref Info: Backreferencing ON on input line 4180. -Package hyperref Info: Implicit mode ON; LaTeX internals redefined. -Package hyperref Info: Bookmarks ON on input line 4410. - -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/backref.sty -Package: backref 2021/02/04 v1.41 Bibliographical back referencing - -(/usr/local/texlive/2022/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty -Package: rerunfilecheck 2022-07-10 v1.10 Rerun checks for auxiliary files (HO) -(/usr/local/texlive/2022/texmf-dist/tex/latex/base/atveryend-ltx.sty -Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac -kage -with kernel methods -) -(/usr/local/texlive/2022/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty -Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO) -(/usr/local/texlive/2022/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty -Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO -) -)) -Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 -85. -)) -\c@Hy@tempcnt=\count197 - -(/usr/local/texlive/2022/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 4748. -\XeTeXLinkMargin=\dimen146 - -(/usr/local/texlive/2022/texmf-dist/tex/generic/bitset/bitset.sty -Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) -) -\Fld@menulength=\count198 -\Field@Width=\dimen147 -\Fld@charsize=\dimen148 -Package hyperref Info: Hyper figures OFF on input line 6027. -Package hyperref Info: Link nesting OFF on input line 6032. -Package hyperref Info: Hyper index ON on input line 6035. -Package hyperref Info: backreferencing ON on input line 6040. -Package hyperref Info: Link coloring OFF on input line 6047. -Package hyperref Info: Link coloring with OCG OFF on input line 6052. -Package hyperref Info: PDF/A mode OFF on input line 6057. - -(/usr/local/texlive/2022/texmf-dist/tex/latex/base/atbegshi-ltx.sty -Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi -package with kernel methods -) -\Hy@abspage=\count199 -\c@Item=\count266 -\c@Hfootnote=\count267 -) -Package hyperref Info: Driver: hdvipdfm. - -(/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/hdvipdfm.def -File: hdvipdfm.def 2022-09-22 v7.00t Hyperref driver for dvipdfm -\pdfm@box=\box51 -\c@Hy@AnnotLevel=\count268 -\HyField@AnnotCount=\count269 -\Fld@listcount=\count270 -\c@bookmark@seq@number=\count271 -\Hy@SectionHShift=\skip58 -) -(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-dvips.def -File: l3backend-dvips.def 2022-10-26 L3 backend support: dvips -\l__pdf_internal_box=\box52 -\g__pdf_backend_object_int=\count272 -\l__pdf_backend_content_box=\box53 -\l__pdf_backend_model_box=\box54 -\g__pdf_backend_annotation_int=\count273 -\g__pdf_backend_link_int=\count274 -\g__pdf_backend_link_sf_int=\count275 -) -(./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. -LaTeX Font Info: Checking defaults for PU/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. - (./pycbf.out) (./pycbf.out) -\@outlinefile=\write3 -\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 1478--1478 -[][][] []\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 1507--1507 -[][][] []\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 1536--1536 -[][][] []\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 1652--1652 -[][][] []\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 1681--1681 -[][][] []\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 1711--1711 -[][][] []\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 1741--1741 -[][][] []\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 1770--1770 -[][][] []\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 1799--1799 -[][][] []\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 1867--1867 -[][][][]\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 1868--1868 -[][][][]\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 1872--1872 -[][][] []\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 1884--1884 -[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( -size_t) elements, (const char *)byteorder, - [] - - -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 (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; - [] - - -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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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"],[],], - [] - - -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){ - [] - - -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 (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 (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 (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 (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){ - [] - - -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, - [] - - -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 (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 (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 (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 (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 (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 (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 (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 (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 (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, - [] - - -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)); - [] - - -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 (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 (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 (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 (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 (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 (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 (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 (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, - [] - - -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)); - [] - - -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 (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 (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 (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 (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)); - [] - - -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){ - [] - - -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 (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 (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 (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)); - [] - - -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; - [] - - -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 (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 (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 (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 (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 (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 (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)); - [] - - -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; - [] - - -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 (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 (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 (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 (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 (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 (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 (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)); - [] - - -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"],], - [] - - -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 (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 (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 (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 (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 (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 (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 (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 (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){ - [] - - -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)); - [] - - -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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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)); - [] - - -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"],[] ], - [] - - -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) { - [] - - -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)); - [] - - -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"] ], - [] - - -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 (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 (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"],], - [] - - -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"],], - [] - - -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 (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 (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 (7.20148pt too wide) in paragraph at lines 3715--3715 -[][][] []\OT1/cmtt/m/n/9 indexfast,indexslow -,normal1,normal2,normal3)); - [] - - -Overfull \hbox (7.20148pt too wide) in paragraph at lines 3727--3727 -[][][] []\OT1/cmtt/m/n/9 indexslow,indexfast -,normal1,normal2,normal3)); - [] - - -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 (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 (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, - [] - - -Overfull \hbox (21.37631pt too wide) in paragraph at lines 3758--3758 -[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * -fastaxis2, double *fastaxis3){ - [] - - -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 (35.55115pt too wide) in paragraph at lines 3772--3772 -[][][] []\OT1/cmtt/m/n/9 double *slowaxis1, doubl -e *slowaxis2, double *slowaxis3){ - [] - - -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, - [] - - -Overfull \hbox (21.37631pt too wide) in paragraph at lines 3786--3786 -[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * -fastaxis2, double *fastaxis3){ - [] - - -Overfull \hbox (11.92642pt too wide) in paragraph at lines 3829--3829 -[][][] []\OT1/cmtt/m/n/9 indexfast, index -slow, area,projected_area)); - [] - - -Overfull \hbox (11.92642pt too wide) in paragraph at lines 3840--3840 -[][][] []\OT1/cmtt/m/n/9 indexslow, index -fast, area,projected_area)); - [] - - -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)); - [] - - -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 (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 (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 (30.8262pt too wide) in paragraph at lines 3949--3949 -[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center -slow","double centerfast"],[],], - [] - - -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"],[],], - [] - - -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 (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 (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 (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 (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 (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"] ], - [] - - -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"], - [] - - -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 (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 (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) - [] - - -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) - [] - - -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 (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 (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 (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 (68.62393pt too high) has occurred while \output is active [] - - -[14] -! Missing $ inserted. - - $ -l.4741 ...n of pycbf_test1 with write logic added} - -? -! Missing $ inserted. - - $ -l.4741 ...n of pycbf_test1 with write logic added} - -? - -Package hyperref Warning: Token not allowed in a PDF string (Unicode): -(hyperref) removing `subscript' on input line 4741. - - -Underfull \vbox (badness 4899) 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.4859 \end{flushleft} - -? -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 4859. -! Missing $ inserted. - - $ -l.4859 \end{flushleft} - -? -[17] -Overfull \hbox (68.62576pt too wide) in paragraph at lines 4886--4886 -[][][] []\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 (68.62576pt too wide) in paragraph at lines 4887--4887 -[][][] []\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 (68.62576pt too wide) in paragraph at lines 4888--4888 -[][][] []\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 (68.62576pt too wide) in paragraph at lines 4889--4889 -[][][] []\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 (49.72598pt too wide) in paragraph at lines 4891--4891 -[][][] []\OT1/cmtt/m/n/9 print("surface axes:", d.get_detector_surface_axes -(0), d.get_detector_surface_axes(1)) - [] - - -Overfull \hbox (182.02444pt too wide) in paragraph at lines 4893--4893 -[][][] []\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 (182.02444pt too wide) in paragraph at lines 4894--4894 -[][][] []\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 (16.65137pt too wide) in paragraph at lines 4903--4903 -[][][] []\OT1/cmtt/m/n/9 print(" equipment_component", cbf.get_axis_e -quipment_component(cur_axis)) - [] - - -Overfull \hbox (134.775pt too wide) in paragraph at lines 4905--4905 -[][][] []\OT1/cmtt/m/n/9 print(" vector [ %.8g %.8g %.8g ]" % (round( -vector[0],7), round(vector[1],7), round(vector[2],7))) - [] - - -Overfull \hbox (134.775pt too wide) in paragraph at lines 4907--4907 -[][][] []\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 5052--5052 -[][][] []\OT1/cmtt/m/n/9 UINT32 header_major_version; /* hea -der_major_version (n.) */ - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5053--5053 -[][][] []\OT1/cmtt/m/n/9 UINT32 header_minor_version; /* hea -der_minor_version (.n) */ - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5090--5090 -[][][] []\OT1/cmtt/m/n/9 UINT32 background_applied; /* flags cor -rection has been applied - - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5092--5092 -[][][] []\OT1/cmtt/m/n/9 UINT32 bias_applied; /* flags cor -rection has been applied - - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5094--5094 -[][][] []\OT1/cmtt/m/n/9 UINT32 flatfield_applied; /* flags cor -rection has been applied - - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5096--5096 -[][][] []\OT1/cmtt/m/n/9 UINT32 distortion_applied; /* flags cor -rection has been applied - - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5115--5115 -[][][] []\OT1/cmtt/m/n/9 UINT32 pixel_noise[MAXIMAGES]; /* 1000* -base noise value (ADUs) */ - [] - - -Overfull \hbox (2.47653pt too wide) in paragraph at lines 5159--5159 -[][][] []\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) -Package rerunfilecheck Info: File `pycbf.out' has not changed. -(rerunfilecheck) Checksum: 4A7BFC9172A4D42F10DF7101AC1B722F;4711. - ) -Here is how much of TeX's memory you used: - 8011 strings out of 475067 - 127951 string characters out of 5778806 - 1665342 words of memory out of 5000000 - 29342 multiletter control sequences out of 15000+600000 - 475876 words of font info for 50 fonts, out of 8000000 for 9000 - 1141 hyphenation exceptions out of 8191 - 87i,12n,91p,441b,595s stack positions out of 10000i,1000n,20000p,200000b,200000s - -Output written on pycbf.dvi (24 pages, 225024 bytes). diff --git a/pycbf/pycbf.out b/pycbf/pycbf.out deleted file mode 100644 index 3f3f52e6..00000000 --- a/pycbf/pycbf.out +++ /dev/null @@ -1,21 +0,0 @@ -\BOOKMARK [1][-]{section.1}{\376\377\0001\000\040\000I\000n\000t\000r\000o\000d\000u\000c\000t\000i\000o\000n}{}% 1 -\BOOKMARK [1][-]{section.2}{\376\377\0002\000\040\000I\000n\000s\000t\000a\000l\000l\000a\000t\000i\000o\000n\000\040\000p\000r\000e\000r\000e\000q\000u\000i\000s\000i\000t\000e\000s}{}% 2 -\BOOKMARK [1][-]{section.3}{\376\377\0003\000\040\000G\000e\000n\000e\000r\000a\000t\000i\000n\000g\000\040\000t\000h\000e\000\040\000c\000\040\000i\000n\000t\000e\000r\000f\000a\000c\000e\000\040\000-\000\040\000t\000h\000e\000\040\000S\000W\000I\000G\000\040\000f\000i\000l\000e}{}% 3 -\BOOKMARK [2][-]{subsection.3.1}{\376\377\0003\000.\0001\000\040\000E\000x\000c\000e\000p\000t\000i\000o\000n\000s}{section.3}% 4 -\BOOKMARK [2][-]{subsection.3.2}{\376\377\0003\000.\0002\000\040\000E\000x\000c\000e\000p\000t\000i\000o\000n\000s}{section.3}% 5 -\BOOKMARK [1][-]{section.4}{\376\377\0004\000\040\000D\000o\000c\000s\000t\000r\000i\000n\000g\000s}{}% 6 -\BOOKMARK [1][-]{section.5}{\376\377\0005\000\040\000W\000r\000a\000p\000p\000e\000r\000s}{}% 7 -\BOOKMARK [1][-]{section.6}{\376\377\0006\000\040\000B\000u\000i\000l\000d\000i\000n\000g\000\040\000p\000y\000t\000h\000o\000n\000\040\000e\000x\000t\000e\000n\000s\000i\000o\000n\000s\000\040\000-\000\040\000t\000h\000e\000\040\000s\000e\000t\000u\000p\000\040\000f\000i\000l\000e}{}% 8 -\BOOKMARK [1][-]{section.7}{\376\377\0007\000\040\000B\000u\000i\000l\000d\000i\000n\000g\000\040\000a\000n\000d\000\040\000t\000e\000s\000t\000i\000n\000g\000\040\000t\000h\000e\000\040\000r\000e\000s\000u\000l\000t\000i\000n\000g\000\040\000p\000a\000c\000k\000a\000g\000e}{}% 9 -\BOOKMARK [1][-]{section.8}{\376\377\0008\000\040\000D\000e\000b\000u\000g\000g\000i\000n\000g\000\040\000c\000o\000m\000p\000i\000l\000e\000d\000\040\000e\000x\000t\000e\000n\000s\000i\000o\000n\000s}{}% 10 -\BOOKMARK [1][-]{section.9}{\376\377\0009\000\040\000T\000h\000i\000n\000g\000s\000\040\000w\000h\000i\000c\000h\000\040\000a\000r\000e\000\040\000c\000u\000r\000r\000e\000n\000t\000l\000y\000\040\000m\000i\000s\000s\000i\000n\000g}{}% 11 -\BOOKMARK [1][-]{section.10}{\376\377\0001\0000\000\040\000T\000e\000s\000t\000i\000n\000g}{}% 12 -\BOOKMARK [2][-]{subsection.10.1}{\376\377\0001\0000\000.\0001\000\040\000R\000e\000a\000d\000\040\000a\000\040\000f\000i\000l\000e\000\040\000b\000a\000s\000e\000d\000\040\000o\000n\000\040\000c\000i\000f\0002\000c\000b\000f\000.\000c}{section.10}% 13 -\BOOKMARK [2][-]{subsection.10.2}{\376\377\0001\0000\000.\0002\000\040\000T\000r\000y\000\040\000t\000o\000\040\000t\000e\000s\000t\000\040\000t\000h\000e\000\040\000g\000o\000n\000i\000o\000m\000e\000t\000e\000r\000\040\000a\000n\000d\000\040\000d\000e\000t\000e\000c\000t\000o\000r}{section.10}% 14 -\BOOKMARK [2][-]{subsection.10.3}{\376\377\0001\0000\000.\0003\000\040\000T\000e\000s\000t\000\040\000c\000a\000s\000e\000s\000\040\000f\000o\000r\000\040\000t\000h\000e\000\040\000g\000e\000n\000e\000r\000i\000c\000s}{section.10}% 15 -\BOOKMARK [2][-]{subsection.10.4}{\376\377\0001\0000\000.\0004\000\040\000V\000e\000r\000s\000i\000o\000n\000\040\000o\000f\000\040\000p\000y\000c\000b\000f\000t\000e\000s\000t\0001\000\040\000w\000i\000t\000h\000\040\000w\000r\000i\000t\000e\000\040\000l\000o\000g\000i\000c\000\040\000a\000d\000d\000e\000d}{section.10}% 16 -\BOOKMARK [2][-]{subsection.10.5}{\376\377\0001\0000\000.\0005\000\040\000P\000r\000o\000c\000e\000s\000s\000i\000n\000g\000\040\000o\000f\000\040\000X\000F\000E\000L\000\040\000a\000x\000e\000s}{section.10}% 17 -\BOOKMARK [1][-]{section.11}{\376\377\0001\0001\000\040\000W\000o\000r\000k\000e\000d\000\040\000e\000x\000a\000m\000p\000l\000e\000\040\0001\000\040\000:\000\040\000x\000m\000a\000s\000\040\000b\000e\000a\000m\000l\000i\000n\000e\000\040\000+\000\040\000m\000a\000r\000\040\000c\000c\000d\000\040\000d\000e\000t\000e\000c\000t\000o\000r\000\040\000a\000t\000\040\000t\000h\000e\000\040\000E\000S\000R\000F}{}% 18 -\BOOKMARK [2][-]{subsection.11.1}{\376\377\0001\0001\000.\0001\000\040\000R\000e\000a\000d\000i\000n\000g\000\040\000m\000a\000r\000c\000c\000d\000\040\000h\000e\000a\000d\000e\000r\000s}{section.11}% 19 -\BOOKMARK [2][-]{subsection.11.2}{\376\377\0001\0001\000.\0002\000\040\000W\000r\000i\000t\000i\000n\000g\000\040\000o\000u\000t\000\040\000c\000i\000f\000\040\000f\000i\000l\000e\000s\000\040\000f\000o\000r\000\040\000f\000i\000t\0002\000d\000/\000x\000m\000a\000s}{section.11}% 20 -\BOOKMARK [2][-]{subsection.11.3}{\376\377\0001\0001\000.\0003\000\040\000A\000\040\000t\000e\000m\000p\000l\000a\000t\000e\000\040\000c\000i\000f\000\040\000f\000i\000l\000e\000\040\000f\000o\000r\000\040\000t\000h\000e\000\040\000x\000m\000a\000s\000\040\000b\000e\000a\000m\000l\000i\000n\000e}{section.11}% 21 diff --git a/pycbf/pycbf.pdf b/pycbf/pycbf.pdf deleted file mode 100644 index d0360a73..00000000 Binary files a/pycbf/pycbf.pdf and /dev/null differ diff --git a/pycbf/pycbf.py b/pycbf/pycbf.py deleted file mode 100644 index 9d850122..00000000 --- a/pycbf/pycbf.py +++ /dev/null @@ -1,9265 +0,0 @@ -# coding=utf-8 -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.10 -# -# 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 -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) - else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -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_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -try: - _object = object - _newclass = 1 -except __builtin__.Exception: - class _object: - pass - _newclass = 0 - - -__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): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, doubleArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, doubleArray, name) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _pycbf.new_doubleArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _pycbf.delete_doubleArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _pycbf.doubleArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _pycbf.doubleArray___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) - -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) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _pycbf.new_intArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _pycbf.delete_intArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _pycbf.intArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _pycbf.intArray___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) - -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) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _pycbf.new_shortArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _pycbf.delete_shortArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _pycbf.shortArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _pycbf.shortArray___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) - -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) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _pycbf.new_longArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _pycbf.delete_longArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _pycbf.longArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _pycbf.longArray___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) - -def longArray_frompointer(t): - return _pycbf.longArray_frompointer(t) -longArray_frompointer = _pycbf.longArray_frompointer - -CBF_INTEGER = _pycbf.CBF_INTEGER -CBF_FLOAT = _pycbf.CBF_FLOAT -CBF_CANONICAL = _pycbf.CBF_CANONICAL -CBF_PACKED = _pycbf.CBF_PACKED -CBF_PACKED_V2 = _pycbf.CBF_PACKED_V2 -CBF_BYTE_OFFSET = _pycbf.CBF_BYTE_OFFSET -CBF_PREDICTOR = _pycbf.CBF_PREDICTOR -CBF_NONE = _pycbf.CBF_NONE -CBF_COMPRESSION_MASK = _pycbf.CBF_COMPRESSION_MASK -CBF_FLAG_MASK = _pycbf.CBF_FLAG_MASK -CBF_UNCORRELATED_SECTIONS = _pycbf.CBF_UNCORRELATED_SECTIONS -CBF_FLAT_IMAGE = _pycbf.CBF_FLAT_IMAGE -CBF_NO_EXPAND = _pycbf.CBF_NO_EXPAND -PLAIN_HEADERS = _pycbf.PLAIN_HEADERS -MIME_HEADERS = _pycbf.MIME_HEADERS -MSG_NODIGEST = _pycbf.MSG_NODIGEST -MSG_DIGEST = _pycbf.MSG_DIGEST -MSG_DIGESTNOW = _pycbf.MSG_DIGESTNOW -MSG_DIGESTWARN = _pycbf.MSG_DIGESTWARN -PAD_1K = _pycbf.PAD_1K -PAD_2K = _pycbf.PAD_2K -PAD_4K = _pycbf.PAD_4K -CBF_PARSE_BRC = _pycbf.CBF_PARSE_BRC -CBF_PARSE_PRN = _pycbf.CBF_PARSE_PRN -CBF_PARSE_BKT = _pycbf.CBF_PARSE_BKT -CBF_PARSE_BRACKETS = _pycbf.CBF_PARSE_BRACKETS -CBF_PARSE_TQ = _pycbf.CBF_PARSE_TQ -CBF_PARSE_CIF2_DELIMS = _pycbf.CBF_PARSE_CIF2_DELIMS -CBF_PARSE_DDLm = _pycbf.CBF_PARSE_DDLm -CBF_PARSE_CIF2 = _pycbf.CBF_PARSE_CIF2 -CBF_PARSE_DEFINES = _pycbf.CBF_PARSE_DEFINES -CBF_PARSE_WIDE = _pycbf.CBF_PARSE_WIDE -CBF_PARSE_UTF8 = _pycbf.CBF_PARSE_UTF8 -HDR_DEFAULT = _pycbf.HDR_DEFAULT -MIME_NOHEADERS = _pycbf.MIME_NOHEADERS -CBF = _pycbf.CBF -CIF = _pycbf.CIF -ENC_NONE = _pycbf.ENC_NONE -ENC_BASE64 = _pycbf.ENC_BASE64 -ENC_BASE32K = _pycbf.ENC_BASE32K -ENC_QP = _pycbf.ENC_QP -ENC_BASE10 = _pycbf.ENC_BASE10 -ENC_BASE16 = _pycbf.ENC_BASE16 -ENC_BASE8 = _pycbf.ENC_BASE8 -ENC_FORWARD = _pycbf.ENC_FORWARD -ENC_BACKWARD = _pycbf.ENC_BACKWARD -ENC_CRTERM = _pycbf.ENC_CRTERM -ENC_LFTERM = _pycbf.ENC_LFTERM -ENC_DEFAULT = _pycbf.ENC_DEFAULT - -def compute_reciprocal_cell(cell): - """ - - 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 AAngstroms, and the double - values cell[3:5] giving the cell angles a, b and g in degrees. The - double values rcell[0:2] will be set to the reciprocal cell lengths - a*, b* and c* in AAngstroms-1 and the double values rcell[3:5] will - be set to the reciprocal cell angles a*, b* and g* 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 _pycbf.compute_reciprocal_cell(cell) - -def get_local_real_format(): - """ - - 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 _pycbf.get_local_real_format() - -def get_local_integer_byte_order(): - """ - - 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 _pycbf.get_local_integer_byte_order() - -def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): - """ - - 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 _pycbf.airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm) - -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) - -def get_local_real_byte_order(): - """ - - 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 _pycbf.get_local_real_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) -class cbf_positioner_struct(_object): - """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) - __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) - - 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 - __swig_destroy__ = _pycbf.delete_cbf_positioner_struct - __del__ = lambda self: None - - def rotate_vector(self, ratio, initial1, initial2, initial3): - """ - - 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. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_positioner_struct_rotate_vector(self, ratio, initial1, initial2, initial3) - - - def get_goniometer_poise(self, ratio): - """ - - 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 _pycbf.cbf_positioner_struct_get_goniometer_poise(self, ratio) - - - def get_rotation_axis(self): - """ - - 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): - """ - - 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 _pycbf.cbf_positioner_struct_get_rotation_range(self) - - - 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); - - 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. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_positioner_struct_get_reciprocal(self, ratio, wavelength, real1, real2, real3) - -cbf_positioner_struct_swigregister = _pycbf.cbf_positioner_struct_swigregister -cbf_positioner_struct_swigregister(cbf_positioner_struct) - -class cbf_detector_struct(_object): - """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) - __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) - - 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 - __swig_destroy__ = _pycbf.delete_cbf_detector_struct - __del__ = lambda self: None - - def get_detector_axis_fast(self): - """ - - 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_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_axis_fast(self) - - - def get_pixel_area_fs(self, indexfast, indexslow): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_area_fs(self, indexfast, indexslow) - - - def set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): - """ - - 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 _pycbf.cbf_detector_struct_set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow) - - - def get_pixel_area(self, index1, index2): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_area(self, index1, index2) - - - def get_detector_axis_slow(self): - """ - - 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. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_detector_struct_get_detector_axis_slow(self) - - - def get_pixel_coordinates(self, index1, index2): - """ - - 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 set_beam_center(self, indexslow, indexfast, centerslow, centerfast): - """ - - 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 _pycbf.cbf_detector_struct_set_beam_center(self, indexslow, indexfast, centerslow, centerfast) - - - def get_beam_center_fs(self): - """ - - 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 _pycbf.cbf_detector_struct_get_beam_center_fs(self) - - - def get_pixel_area_sf(self, indexslow, indexfast): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_area_sf(self, indexslow, indexfast) - - - def set_beam_center_fs(self): - """ - - 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 _pycbf.cbf_detector_struct_set_beam_center_fs(self) - - - def set_beam_center_sf(self): - """ - - 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 _pycbf.cbf_detector_struct_set_beam_center_sf(self) - - - def get_detector_axes(self): - """ - - 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_beam_center_sf(self): - """ - - 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 _pycbf.cbf_detector_struct_get_beam_center_sf(self) - - - def get_detector_distance(self): - """ - - 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 _pycbf.cbf_detector_struct_get_detector_distance(self) - - - 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) - - - def get_pixel_coordinates_sf(self, indexslow, indexfast): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_coordinates_sf(self, indexslow, indexfast) - - - def get_detector_axes_sf(self): - """ - - 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_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_sf(self) - - - def get_pixel_normal(self, index1, index2): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_normal(self, index1, index2) - - - def set_reference_beam_center_sf(self): - """ - - 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 _pycbf.cbf_detector_struct_set_reference_beam_center_sf(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) - - - def get_detector_normal(self): - """ - - 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 _pycbf.cbf_detector_struct_get_detector_normal(self) - - - def get_inferred_pixel_size_sf(self, axis_number): - """ - - 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. - 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_sf(self, axis_number) - - - def get_beam_center(self): - """ - - 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 _pycbf.cbf_detector_struct_get_beam_center(self) - - - def get_pixel_normal_fs(self, indexfast, indexslow): - """ - - 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 _pycbf.cbf_detector_struct_get_pixel_normal_fs(self, indexfast, indexslow) - - - def get_detector_axes_fs(self): - """get_detector_axes_fs(cbf_detector_struct self)""" - return _pycbf.cbf_detector_struct_get_detector_axes_fs(self) - - - def set_reference_beam_center(self): - """ - - 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 _pycbf.cbf_detector_struct_set_reference_beam_center(self) - - - def get_inferred_pixel_size(self, axis_number): - """ - - 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. - 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(self, axis_number) - - - 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) - -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 - - def set_saveframename(self, arg): - """ - - 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. - 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 get_real_3d_image_sf_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_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 _pycbf.cbf_handle_struct_get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) - - - def set_doublevalue(self, format, number): - """ - - 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 _pycbf.cbf_handle_struct_set_doublevalue(self, format, number) - - - def set_datablockname(self, arg): - """ - - 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 - - """ - return _pycbf.cbf_handle_struct_set_datablockname(self, arg) - - - def get_timestamp(self): - """ - - 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 _pycbf.cbf_handle_struct_get_timestamp(self) - - - def set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow) - - - def get_integervalue(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integervalue(self) - - - def get_axis_rotation(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_rotation(self, axis_id) - - - def rewind_blockitem(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_blockitem(self) - - - 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) - - - 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) - - - def read_template(self, filename): - """ - - 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 _pycbf.cbf_handle_struct_read_template(self, filename) - - - def select_column(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_select_column(self, arg) - - - def get_integerarrayparameters_wdims_fs(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_fs(self) - - - def find_datablock(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_find_datablock(self, arg) - - - def set_tag_root(self, tagname, tagroot_in): - """ - - 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 _pycbf.cbf_handle_struct_set_tag_root(self, tagname, tagroot_in) - - - def set_real_3d_image(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 (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(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) - - - def set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast) - - - def get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - - - def set_tag_category(self, tagname, categoryname_in): - """ - - 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 _pycbf.cbf_handle_struct_set_tag_category(self, tagname, categoryname_in) - - - def get_typeofvalue(self): - """ - - 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 _pycbf.cbf_handle_struct_get_typeofvalue(self) - - - def set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - - - def datablock_name(self): - """ - - 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 _pycbf.cbf_handle_struct_datablock_name(self) - - - def get_integerarrayparameters_wdims(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims(self) - - - def construct_reference_detector(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_construct_reference_detector(self, element_number) - - - def set_typeofvalue(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_set_typeofvalue(self, arg) - - - def find_column(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_find_column(self, arg) - - - def require_column(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_require_column(self, arg) - - - def set_category_root(self, categoryname, categoryroot): - """ - - 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 _pycbf.cbf_handle_struct_set_category_root(self, categoryname, categoryroot) - - - def get_diffrn_id(self): - """ - - 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 _pycbf.cbf_handle_struct_get_diffrn_id(self) - - - def set_divergence(self, div_x_source, div_y_source, div_x_y_source): - """ - - 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 _pycbf.cbf_handle_struct_set_divergence(self, div_x_source, div_y_source, div_x_y_source) - - - 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) - - - def set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow) - - - 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) - - - 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); - - 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_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) - - - def set_gain(self, element_number, gain, gain_esd): - """ - - 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 _pycbf.cbf_handle_struct_set_gain(self, element_number, gain, gain_esd) - - - def get_divergence(self): - """ - - 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 _pycbf.cbf_handle_struct_get_divergence(self) - - - def rewind_column(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_column(self) - - - def get_pixel_size_sf(self, element_number, axis_number): - """ - - 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 _pycbf.cbf_handle_struct_get_pixel_size_sf(self, element_number, axis_number) - - - def set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - - - def get_polarization(self): - """ - - 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 _pycbf.cbf_handle_struct_get_polarization(self) - - - 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 set_reciprocal_cell(self, cell): - """ - - 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 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 - - """ - return _pycbf.cbf_handle_struct_set_reciprocal_cell(self, cell) - - - def set_reciprocal_cell_esd(self, cell_esd): - """ - - 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 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 - - """ - return _pycbf.cbf_handle_struct_set_reciprocal_cell_esd(self, cell_esd) - - - def construct_positioner(self, axis_id): - """ - - 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. 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_construct_positioner(self, axis_id) - - - def set_unit_cell(self, cell): - """ - - 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 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. 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_unit_cell(self, cell) - - - def set_unit_cell_esd(self, cell_esd): - """ - - 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 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. 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_unit_cell_esd(self, cell_esd) - - - def set_crystal_id(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_set_crystal_id(self, arg) - - - def get_integerarrayparameters_wdims_sf(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_sf(self) - - - def set_diffrn_id(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_set_diffrn_id(self, arg) - - - def set_integervalue(self, number): - """ - - 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 _pycbf.cbf_handle_struct_set_integervalue(self, number) - - - def count_datablocks(self): - """ - - 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 _pycbf.cbf_handle_struct_count_datablocks(self) - - - def set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding) - - - 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) - - - def get_axis_equipment(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_equipment(self, axis_id) - - - def set_value(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_set_value(self, arg) - - - def new_category(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_new_category(self, arg) - - - def set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow) - - - def find_nextrow(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_find_nextrow(self, arg) - - - def select_row(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_select_row(self, arg) - - - def get_axis_ancestor(self, axis_id, ancestor_index): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_ancestor(self, axis_id, ancestor_index) - - - def set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - - - def get_axis_poise(self, ratio, axis_id, frame_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_poise(self, ratio, axis_id, frame_id) - - - def construct_reference_positioner(self, axis_id): - """ - - 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. 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_construct_reference_positioner(self, axis_id) - - - def find_category(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_find_category(self, arg) - - - def get_realarrayparameters_wdims_sf(self): - """ - - 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 _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_sf(self) - - - def require_integervalue(self, thedefault): - """ - - 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 _pycbf.cbf_handle_struct_require_integervalue(self, thedefault) - - - def set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements): - """ - - 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 _pycbf.cbf_handle_struct_set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements) - - - def find_row(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_find_row(self, arg) - - - 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 get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow) - - - def get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast) - - - def force_new_datablock(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_force_new_datablock(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 count_axis_ancestors(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_count_axis_ancestors(self, axis_id) - - - def set_pixel_size(self, element_number, axis_number, psize): - """ - - 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 - "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(self, element_number, axis_number, psize) - - - def get_element_id(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_get_element_id(self, element_number) - - - def set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) - - - def get_3d_image_size_sf(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_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 _pycbf.cbf_handle_struct_get_3d_image_size_sf(self, element_number) - - - def count_elements(self): - """ - - 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 _pycbf.cbf_handle_struct_count_elements(self) - - - def next_column(self): - """ - - 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 _pycbf.cbf_handle_struct_next_column(self) - - - def read_widefile(self, filename, headers): - """ - - 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 _pycbf.cbf_handle_struct_read_widefile(self, filename, headers) - - - def find_tag_category(self, tagname): - """ - - 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 _pycbf.cbf_handle_struct_find_tag_category(self, tagname) - - - 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 remove_category(self): - """ - - 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 _pycbf.cbf_handle_struct_remove_category(self) - - - def get_realarrayparameters_wdims_fs(self): - """ - - 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 _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_fs(self) - - - def get_image_sf_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_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 _pycbf.cbf_handle_struct_get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) - - - 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 force_new_category(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_force_new_category(self, arg) - - - def get_axis_setting(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_setting(self, axis_id) - - - def get_axis_offset(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_offset(self, axis_id) - - - def count_rows(self): - """ - - 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 _pycbf.cbf_handle_struct_count_rows(self) - - - def set_timestamp(self, time, timezone, precision): - """ - - 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 require_column_doublevalue(self, columnname, defaultvalue): - """ - - 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 _pycbf.cbf_handle_struct_require_column_doublevalue(self, columnname, defaultvalue) - - - def require_column_value(self, columnname, defaultvalue): - """ - - 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 _pycbf.cbf_handle_struct_require_column_value(self, columnname, defaultvalue) - - - def next_category(self): - """ - - 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 _pycbf.cbf_handle_struct_next_category(self) - - - 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) - - - def get_axis_type(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_type(self, axis_id) - - - def count_columns(self): - """ - - 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 _pycbf.cbf_handle_struct_count_columns(self) - - - def set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_integerarray_wdims(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): - """ - - 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. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8) - - - def count_categories(self): - """ - - 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 _pycbf.cbf_handle_struct_count_categories(self) - - - def rewind_datablock(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_datablock(self) - - - 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 rewind_row(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_row(self) - - - def construct_goniometer(self): - """ - - 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 _pycbf.cbf_handle_struct_construct_goniometer(self) - - - def reset_saveframe(self): - """ - - 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 _pycbf.cbf_handle_struct_reset_saveframe(self) - - - def get_realarrayparameters(self): - """ - - 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 _pycbf.cbf_handle_struct_get_realarrayparameters(self) - - - def get_pixel_size(self, element_number, axis_number): - """ - - 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 _pycbf.cbf_handle_struct_get_pixel_size(self, element_number, axis_number) - - - 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_gain(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_get_gain(self, element_number) - - - def category_name(self): - """ - - 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 _pycbf.cbf_handle_struct_category_name(self) - - - def force_new_saveframe(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_force_new_saveframe(self, arg) - - - def find_tag_root(self, tagname): - """ - - 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 _pycbf.cbf_handle_struct_find_tag_root(self, tagname) - - - def get_element_number(self): - """get_element_number(cbf_handle_struct self)""" - return _pycbf.cbf_handle_struct_get_element_number(self) - - - def rewind_saveframe(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_saveframe(self) - - - def get_realarray_as_string(self): - """ - - 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 _pycbf.cbf_handle_struct_get_realarray_as_string(self) - - - def write_widefile(self, filename, ciforcbf, headers, encoding): - """ - - 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 _pycbf.cbf_handle_struct_write_widefile(self, filename, ciforcbf, headers, encoding) - - - def reset_category(self): - """ - - 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 _pycbf.cbf_handle_struct_reset_category(self) - - - def read_file(self, filename, headers): - """ - - 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 _pycbf.cbf_handle_struct_read_file(self, filename, headers) - - - def set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in): - """ - - 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 _pycbf.cbf_handle_struct_set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in) - - - def construct_detector(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_construct_detector(self, element_number) - - - def set_realarray(self, compression, binary_id, data, elsize, elements): - """ - - 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 _pycbf.cbf_handle_struct_set_realarray(self, compression, binary_id, data, elsize, elements) - - - def set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - - - def get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - - - def require_doublevalue(self, defaultvalue): - """ - - 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 _pycbf.cbf_handle_struct_require_doublevalue(self, defaultvalue) - - - def get_realarrayparameters_wdims(self): - """ - - 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 _pycbf.cbf_handle_struct_get_realarrayparameters_wdims(self) - - - def require_reference_detector(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_require_reference_detector(self, element_number) - - - def remove_datablock(self): - """ - - 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 _pycbf.cbf_handle_struct_remove_datablock(self) - - - def next_row(self): - """ - - 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 _pycbf.cbf_handle_struct_next_row(self) - - - def remove_column(self): - """ - - 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 _pycbf.cbf_handle_struct_remove_column(self) - - - def set_axis_setting(self, axis_id, start, increment): - """ - - 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 _pycbf.cbf_handle_struct_set_axis_setting(self, axis_id, start, increment) - - - def get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast) - - - def get_axis_depends_on(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_depends_on(self, axis_id) - - - def require_value(self, defaultvalue): - """ - - 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 _pycbf.cbf_handle_struct_require_value(self, defaultvalue) - - - def get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow) - - - def new_row(self): - """ - - 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 _pycbf.cbf_handle_struct_new_row(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) - - - def get_value(self): - """ - - 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 _pycbf.cbf_handle_struct_get_value(self) - - - 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 : - - 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. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_orientation_matrix(self) - - - def get_dictionary(self): - """ - - 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 _pycbf.cbf_handle_struct_get_dictionary(self) - - - def column_name(self): - """ - - 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 _pycbf.cbf_handle_struct_column_name(self) - - - 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 remove_saveframe(self): - """ - - 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 _pycbf.cbf_handle_struct_remove_saveframe(self) - - - def set_polarization(self, polarizn_source_ratio, polarizn_source_norm): - """ - - 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 _pycbf.cbf_handle_struct_set_polarization(self, polarizn_source_ratio, polarizn_source_norm) - - - def set_wavelength(self, wavelength): - """ - - 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 AA to wavelength. - ARGUMENTS - handle CBF handle. wavelength Wavelength in AA. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_set_wavelength(self, wavelength) - - - def row_number(self): - """ - - 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 _pycbf.cbf_handle_struct_row_number(self) - - - def get_axis_vector(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_vector(self, axis_id) - - - def get_doublevalue(self): - """ - - 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 _pycbf.cbf_handle_struct_get_doublevalue(self) - - - def set_current_timestamp(self, timezone): - """ - - 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 _pycbf.cbf_handle_struct_set_current_timestamp(self, timezone) - - - def set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - - - 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 rewind_category(self): - """ - - 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 _pycbf.cbf_handle_struct_rewind_category(self) - - - 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 get_bin_sizes(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_get_bin_sizes(self, element_number) - - - def set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding) - - - def require_tag_root(self, tagname): - """ - - 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 _pycbf.cbf_handle_struct_require_tag_root(self, tagname) - - - def get_axis_equipment_component(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_equipment_component(self, axis_id) - - - def get_pixel_size_fs(self, element_number, axis_number): - """ - - 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 _pycbf.cbf_handle_struct_get_pixel_size_fs(self, element_number, axis_number) - - - def set_pixel_size_sf(self, element_number, axis_number, psize): - """ - - 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 - - """ - return _pycbf.cbf_handle_struct_set_pixel_size_sf(self, element_number, axis_number, psize) - - - def set_datestamp(self, year, month, day, hour, minute, second, timezone, precision): - """ - - 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 _pycbf.cbf_handle_struct_set_datestamp(self, year, month, day, hour, minute, second, timezone, precision) - - - def set_integration_time(self, time): - """ - - 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 _pycbf.cbf_handle_struct_set_integration_time(self, time) - - - def get_axis_rotation_axis(self, axis_id): - """ - - 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 _pycbf.cbf_handle_struct_get_axis_rotation_axis(self, axis_id) - - - 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) - - - def delete_row(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_delete_row(self, arg) - - - def get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow): - """ - - 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 _pycbf.cbf_handle_struct_get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow) - - - def set_dictionary(self, other): - """ - - 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 _pycbf.cbf_handle_struct_set_dictionary(self, other) - - - 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 - - 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 _pycbf.cbf_handle_struct_get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - - - def get_datestamp(self): - """ - - 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 _pycbf.cbf_handle_struct_get_datestamp(self) - - - def get_crystal_id(self): - """ - - 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 _pycbf.cbf_handle_struct_get_crystal_id(self) - - - def get_image_size_sf(self, element_number): - """ - - 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 _pycbf.cbf_handle_struct_get_image_size_sf(self, element_number) - - - def require_datablock(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_require_datablock(self, arg) - - - def get_unit_cell(self): - """ - - 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 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. 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 _pycbf.cbf_handle_struct_get_unit_cell(self) - - - def get_unit_cell_esd(self): - """get_unit_cell_esd(cbf_handle_struct self)""" - return _pycbf.cbf_handle_struct_get_unit_cell_esd(self) - - - def set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast): - """ - - 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 _pycbf.cbf_handle_struct_set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast) - - - def select_category(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_select_category(self, arg) - - - def new_saveframe(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_new_saveframe(self, arg) - - - def get_integerarray_as_string(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integerarray_as_string(self) - - - def find_category_root(self, categoryname): - """ - - 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 _pycbf.cbf_handle_struct_find_category_root(self, categoryname) - - - 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. - 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 _pycbf.cbf_handle_struct_set_overload(self, element_number, overload) - - - def require_column_integervalue(self, columnname, defaultvalue): - """ - - 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 _pycbf.cbf_handle_struct_require_column_integervalue(self, columnname, defaultvalue) - - - def new_datablock(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_new_datablock(self, arg) - - - def get_integration_time(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integration_time(self) - - - def set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): - """ - - 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 _pycbf.cbf_handle_struct_set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - - - def reset_datablocks(self): - """ - - 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 _pycbf.cbf_handle_struct_reset_datablocks(self) - - - def reset_datablock(self): - """ - - 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 _pycbf.cbf_handle_struct_reset_datablock(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 - - """ - return _pycbf.cbf_handle_struct_get_image_size_fs(self, element_number) - - - def get_integerarrayparameters(self): - """ - - 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 _pycbf.cbf_handle_struct_get_integerarrayparameters(self) - - - def select_datablock(self, arg): - """ - - 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 _pycbf.cbf_handle_struct_select_datablock(self, arg) - -cbf_handle_struct_swigregister = _pycbf.cbf_handle_struct_swigregister -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 c922fcc0..ca42f776 100644 --- a/pycbf/pycbf.tex +++ b/pycbf/pycbf.tex @@ -91,7 +91,7 @@ \usepackage{graphics} % For the pictures \usepackage{anysize} % Try to circumvent Latex default margins \usepackage{fancyhdr} -\usepackage[dvipdfm,bookmarks=true,backref,bookmarksnumbered=true, +\usepackage[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 @@ -150,21 +150,21 @@ \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@"linux.sh"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb66a}{66a}.} +\item \verb@"makeflatascii.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb66b}{66b}.} \item \verb@"make_pycbf.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb10}{10}.} -\item \verb@"py3setup_py.m4"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb11a}{11a}.} +\item \verb@"py3setup_py.m4"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb65a}{65a}.} \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}.} +\item \verb@"pycbf_test1.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb68}{68}.} +\item \verb@"pycbf_test2.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb69a}{69a}.} +\item \verb@"pycbf_test3.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb69b}{69b}.} +\item \verb@"pycbf_test4.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb71}{71}.} +\item \verb@"pycbf_testfelaxes.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb72}{72}.} +\item \verb@"win32.bat"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb65b}{65b}.} +\item \verb@"xmas/readmarheader.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb74}{74}.} +\item \verb@"xmas/xmasheaders.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb76}{76}.} +\item \verb@"xmas/xmas_cif_template.cif"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb78}{78}.} \end{list}} @@ -931,11 +931,11 @@ \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 +\begin{flushleft} \small\label{scrap8}\raggedright\small \NWtarget{nuweb10}{} \verb@"make_pycbf.py"@\nobreak\ {\footnotesize {10}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item +\mbox{}\verb@from re import match@\\ \mbox{}\verb@@\\ \mbox{}\verb@print("\\begin{verbatim}")@\\ \mbox{}\verb@print("This output comes from make_pycbf.py which generates the wrappers")@\\ @@ -1019,7 +1019,7 @@ \section{Wrappers} \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@ if match("^\\s*int cbf_", line): # We found a function@\\ \mbox{}\verb@ # keep going up to DESCRIPTION@\\ \mbox{}\verb@ prototypes+=""+lines[i].rstrip()+" "@\\ \mbox{}\verb@ # print(lines[i].rstrip())@\\ @@ -4360,7 +4360,7 @@ \section{Wrappers} \item{} \end{list} -\end{minipage}\vspace{4ex} +\vspace{4ex} \end{flushleft} \section{Building python extensions - the setup file} @@ -4372,7 +4372,7 @@ \section{Building python extensions - the setup file} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap9}\raggedright\small -\NWtarget{nuweb11a}{} \verb@"py3setup_py.m4"@\nobreak\ {\footnotesize {11a}}$\equiv$ +\NWtarget{nuweb65a}{} \verb@"py3setup_py.m4"@\nobreak\ {\footnotesize {65a}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4411,16 +4411,15 @@ \section{Building and testing the resulting package} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap10}\raggedright\small -\NWtarget{nuweb11b}{} \verb@"win32.bat"@\nobreak\ {\footnotesize {11b}}$\equiv$ +\NWtarget{nuweb65b}{} \verb@"win32.bat"@\nobreak\ {\footnotesize {65b}}$\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@pdflatex pycbf@\\ +\mbox{}\verb@pdflatex pycbf@\\ \mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@pdflatex 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@\\ @@ -4442,16 +4441,15 @@ \section{Building and testing the resulting package} \end{flushleft} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap11}\raggedright\small -\NWtarget{nuweb12a}{} \verb@"linux.sh"@\nobreak\ {\footnotesize {12a}}$\equiv$ +\NWtarget{nuweb66a}{} \verb@"linux.sh"@\nobreak\ {\footnotesize {66a}}$\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@pdflatex pycbf@\\ +\mbox{}\verb@pdflatex pycbf@\\ \mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@pdflatex pycbf@\\ \mbox{}\verb@lynx -dump CBFlib.html > CBFlib.txt@\\ \mbox{}\verb@python make_pycbf.py @\\ \mbox{}\verb@swig -python pycbf.i@\\ @@ -4476,7 +4474,7 @@ \section{Building and testing the resulting package} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap12}\raggedright\small -\NWtarget{nuweb12b}{} \verb@"makeflatascii.py"@\nobreak\ {\footnotesize {12b}}$\equiv$ +\NWtarget{nuweb66b}{} \verb@"makeflatascii.py"@\nobreak\ {\footnotesize {66b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4576,7 +4574,7 @@ \subsection{Read a file based on cif2cbf.c} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap13}\raggedright\small -\NWtarget{nuweb14}{} \verb@"pycbf_test1.py"@\nobreak\ {\footnotesize {14}}$\equiv$ +\NWtarget{nuweb68}{} \verb@"pycbf_test1.py"@\nobreak\ {\footnotesize {68}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@from sys import argv@\\ @@ -4665,7 +4663,7 @@ \subsection{Try to test the goniometer and detector} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap14}\raggedright\small -\NWtarget{nuweb15a}{} \verb@"pycbf_test2.py"@\nobreak\ {\footnotesize {15a}}$\equiv$ +\NWtarget{nuweb69a}{} \verb@"pycbf_test2.py"@\nobreak\ {\footnotesize {69a}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@from sys import argv@\\ @@ -4698,7 +4696,7 @@ \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$ +\NWtarget{nuweb69b}{} \verb@"pycbf_test3.py"@\nobreak\ {\footnotesize {69b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@import pycbf, unittest@\\ @@ -4735,11 +4733,11 @@ \subsection{Test cases for the generics} \end{list} \end{minipage}\vspace{4ex} \end{flushleft} -\subsection{Version of pycbf_test1 with write logic added} +\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$ +\NWtarget{nuweb71}{} \verb@"pycbf_test4.py"@\nobreak\ {\footnotesize {71}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@from sys import argv@\\ @@ -4856,7 +4854,7 @@ \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$ +\NWtarget{nuweb72}{} \verb@"pycbf_testfelaxes.py"@\nobreak\ {\footnotesize {72}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@import pycbf, sys@\\ @@ -4931,7 +4929,7 @@ \subsection{Reading marccd headers} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap18}\raggedright\small -\NWtarget{nuweb20}{} \verb@"xmas/readmarheader.py"@\nobreak\ {\footnotesize {20}}$\equiv$ +\NWtarget{nuweb74}{} \verb@"xmas/readmarheader.py"@\nobreak\ {\footnotesize {74}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@#!/usr/bin/env python@\\ @@ -5291,7 +5289,7 @@ \subsection{Writing out cif files for fit2d/xmas} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap19}\raggedright\small -\NWtarget{nuweb22}{} \verb@"xmas/xmasheaders.py"@\nobreak\ {\footnotesize {22}}$\equiv$ +\NWtarget{nuweb76}{} \verb@"xmas/xmasheaders.py"@\nobreak\ {\footnotesize {76}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@#!/usr/bin/env python@\\ @@ -5568,7 +5566,7 @@ \subsection{A template cif file for the xmas beamline} \begin{flushleft} \small \begin{minipage}{\linewidth}\label{scrap20}\raggedright\small -\NWtarget{nuweb24}{} \verb@"xmas/xmas_cif_template.cif"@\nobreak\ {\footnotesize {24}}$\equiv$ +\NWtarget{nuweb78}{} \verb@"xmas/xmas_cif_template.cif"@\nobreak\ {\footnotesize {78}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ diff --git a/pycbf/pycbf.toc b/pycbf/pycbf.toc deleted file mode 100644 index 9baab160..00000000 --- a/pycbf/pycbf.toc +++ /dev/null @@ -1,21 +0,0 @@ -\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/pycbf/pycbf.w b/pycbf/pycbf.w index b95f6d13..47503699 100644 --- a/pycbf/pycbf.w +++ b/pycbf/pycbf.w @@ -76,7 +76,7 @@ \usepackage{graphics} % For the pictures \usepackage{anysize} % Try to circumvent Latex default margins \usepackage{fancyhdr} -\usepackage[dvipdfm,bookmarks=true,backref,bookmarksnumbered=true, +\usepackage[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 @@ -302,11 +302,10 @@ 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 +pdflatex pycbf +pdflatex pycbf nuweb pycbf +pdflatex 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 @@ -321,11 +320,10 @@ C:\python24\python makeflatascii.py pycbf_ascii_help.txt @o linux.sh @{ nuweb pycbf -latex pycbf -nuweb pycbf -latex pycbf -dvipdfm pycbf +pdflatex pycbf +pdflatex pycbf nuweb pycbf +pdflatex pycbf lynx -dump CBFlib.html > CBFlib.txt python make_pycbf.py swig -python pycbf.i @@ -559,7 +557,7 @@ if __name__=="__main__": @} -\subsection{Version of pycbf_test1 with write logic added} +\subsection{Version of pycbf\_test1 with write logic added} @o pycbf_test4.py -i -t @{from sys import argv diff --git a/pycbf/pycbf_wrap.c b/pycbf/pycbf_wrap.c deleted file mode 100644 index a20e7148..00000000 --- a/pycbf/pycbf_wrap.c +++ /dev/null @@ -1,29757 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.10 - * - * 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(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#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 - -/* 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 >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - 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) ) -#else -# define SWIG_Python_str_DelForPy3(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 -} - -/* 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)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#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) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#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) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# 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; - 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 - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* 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) { -#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); -} - -#else - -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); -} - -#endif - -/* Append a value to the result 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) { - 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; -#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 */ - -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; - } - } -} - -/* 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 - 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 - -/* 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 * -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; - return data ? data->implicitconv : 0; -} - -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 { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - 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, (char *)"__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); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } 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 * -#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); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -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 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); - - 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(val, type, tb); - - 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; -#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; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -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) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -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; - return SWIG_Py_Void(); -} - -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; - return SWIG_Py_Void(); -} - -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; - } - 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; - } -} - -#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"}, - {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) { - 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 */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 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 - }; - - static PyTypeObject swigpyobject_type; - 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 */ - 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 - (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 */ -#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 */ -#if PY_VERSION_HEX >= 0x02020000 - 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 */ -#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 -#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; -} - -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 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) -{ - 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((char *)v->pack, (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 = { - /* 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 */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* 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 */ -#if PY_VERSION_HEX >= 0x02020000 - 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 */ -#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 -#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; -} - -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 - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #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) && (PY_VERSION_HEX >= 0x02030000)) - 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 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; - - /* 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; - 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; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value 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) -{ -#if (PY_VERSION_HEX >= 0x02020000) - 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 - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#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; - } -#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; -#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 -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; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -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 { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - 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 -# 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; - } -#endif - } - 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) { - 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 = 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); -#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); -#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); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* 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) { -#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); - } - } - 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) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), 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); - } - 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 - - - -/* -------- 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) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _pycbf.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__pycbf - -#else -# define SWIG_init init_pycbf - -#endif -#define SWIG_name "_pycbf" - -#define SWIGVERSION 0x030010 -#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 = 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)) { - 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 *)malloc((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 *)malloc((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 *)malloc((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 *)malloc((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 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 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; - } - - -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 -#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)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - - 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; - } - - -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));}; -} - - -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));}; - } - - -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_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_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; - {(error_status = cbf_get_rotation_range (self,reserved, start,increment));}; - } -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 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_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_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_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_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_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_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_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_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_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_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_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_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_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_detector_distance(cbf_detector_struct *self,double *distance){ - {(error_status = cbf_get_detector_distance(self,distance));}; - } -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_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_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_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_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_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_detector_normal(cbf_detector_struct *self,double *normal1,double *normal2,double *normal3){ - {(error_status = cbf_get_detector_normal(self, - 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_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_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_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_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_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_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 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 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; -#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(alloc) *alloc = SWIG_NEWOBJ; -#endif - PyBytes_AsStringAndSize(obj, &cstr, &len); -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#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)); - *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); -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return SWIG_OK; - } 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 (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)); - } - 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_set_saveframename(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_saveframename(self,arg));};} - -#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_doublevalue(cbf_handle_struct *self,char const *format,double number){ - {(error_status = cbf_set_doublevalue(self,format,number));};} -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_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_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 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_get_axis_rotation(cbf_handle_struct *self,char const *axis_id,double *rotation){ - {(error_status = cbf_get_axis_rotation(self,axis_id, - rotation));} -; - } -SWIGINTERN CBF_NODETYPE cbf_handle_struct_rewind_blockitem(cbf_handle_struct *self){ - CBF_NODETYPE result; - {(error_status = cbf_rewind_blockitem(self,&result));}; - return result;} - -#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; - } -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_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_column(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_column(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_find_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_datablock(self,arg));};} -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_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_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);}; - } - } - -#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; - } -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_get_typeofvalue(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_get_typeofvalue(self, &result));}; - return result;} -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 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_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 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_set_typeofvalue(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_typeofvalue(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_require_column(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_column(self,arg));};} -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 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_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_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 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_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; - } - -#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));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -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_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_column(cbf_handle_struct *self){ - {(error_status = cbf_rewind_column(self));};} -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_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_get_polarization(cbf_handle_struct *self,double *in1,double *in2){ - {(error_status = cbf_get_polarization (self, in1, in2));}; - } -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_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 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_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_set_crystal_id(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_crystal_id(self,arg));};} -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_set_diffrn_id(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_diffrn_id(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_integervalue(cbf_handle_struct *self,int number){ - {(error_status = cbf_set_integervalue(self,number));};} -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); -} - -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 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_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_value(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_value(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_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_find_nextrow(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_nextrow(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_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_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_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 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_find_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_category(self,arg));};} -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_require_integervalue(cbf_handle_struct *self,int *number,int thedefault){ - - {(error_status = cbf_require_integervalue(self,number,thedefault));}; - - } -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_find_row(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_row(self,arg));};} -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);}; - } - } - -#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_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 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_new_column(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_column(self,arg));};} -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 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 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_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_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 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_next_column(cbf_handle_struct *self){ - {(error_status = cbf_next_column(self));};} -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 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_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_remove_category(cbf_handle_struct *self){ - {(error_status = cbf_remove_category(self));};} -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; - - } - -#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; - 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 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_force_new_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_force_new_category(self,arg));};} -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_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 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_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_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 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 void cbf_handle_struct_next_category(cbf_handle_struct *self){ - {(error_status = cbf_next_category(self));};} -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 */ - 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 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 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_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_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 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_rewind_datablock(cbf_handle_struct *self){ - {(error_status = cbf_rewind_datablock(self));};} -SWIGINTERN void cbf_handle_struct_remove_row(cbf_handle_struct *self){ - {(error_status = cbf_remove_row(self));};} -SWIGINTERN void cbf_handle_struct_rewind_row(cbf_handle_struct *self){ - {(error_status = cbf_rewind_row(self));};} -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_reset_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_reset_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(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_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_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 char const *cbf_handle_struct_category_name(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_category_name(self, &result));}; - return result;} -SWIGINTERN void cbf_handle_struct_force_new_saveframe(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_force_new_saveframe(self,arg));};} -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_get_element_number(cbf_handle_struct *self){ - {(error_status = CBF_NOTIMPLEMENTED);};} -SWIGINTERN void cbf_handle_struct_rewind_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_rewind_saveframe(self));};} - -#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; - 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_write_widefile(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 */ - 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 void cbf_handle_struct_reset_category(cbf_handle_struct *self){ - {(error_status = cbf_reset_category(self));};} -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 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 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 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_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);}; - } - } - -#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; - } -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_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 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_remove_datablock(cbf_handle_struct *self){ - {(error_status = cbf_remove_datablock(self));};} -SWIGINTERN void cbf_handle_struct_next_row(cbf_handle_struct *self){ - {(error_status = cbf_next_row(self));};} -SWIGINTERN void cbf_handle_struct_remove_column(cbf_handle_struct *self){ - {(error_status = cbf_remove_column(self));};} -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));} -; - } - -#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; - } -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_require_value(cbf_handle_struct *self,char const *defaultvalue){ - const char * result; - {(error_status = cbf_require_value(self, &result, defaultvalue));}; - return result; - } - -#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; - 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_new_row(cbf_handle_struct *self){ - {(error_status = cbf_new_row(self));};} -SWIGINTERN void cbf_handle_struct_next_datablock(cbf_handle_struct *self){ - {(error_status = cbf_next_datablock(self));};} -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 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 cbf_handle cbf_handle_struct_get_dictionary(cbf_handle_struct *self){ - cbf_handle temp; - {(error_status = cbf_get_dictionary(self,&temp));}; - return temp; -} -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_require_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_remove_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_remove_saveframe(self));};} -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_wavelength(cbf_handle_struct *self,double wavelength){ - {(error_status = cbf_set_wavelength(self,wavelength));};} -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 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 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_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_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_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_rewind_category(cbf_handle_struct *self){ - {(error_status = cbf_rewind_category(self));};} -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_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_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_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_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_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_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_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_integration_time(cbf_handle_struct *self,double time){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_integration_time(self,reserved,time));}; - } -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_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_delete_row(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_delete_row(self,arg));};} - -#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; - } -SWIGINTERN void cbf_handle_struct_set_dictionary(cbf_handle_struct *self,cbf_handle other){ - {(error_status = cbf_set_dictionary(self,other));}; -} - -#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; - } -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 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_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_require_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_datablock(self,arg));};} -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_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_select_category(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_new_saveframe(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_saveframe(self,arg));};} - -#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_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 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_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_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_new_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_datablock(self,arg));};} -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_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 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_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_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_select_datablock(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_datablock(self,arg));};} -#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 * obj0 = 0 ; - doubleArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_doubleArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &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 * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_doubleArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - double 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_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(obj1, &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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(obj2, &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 * obj0 = 0 ; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 * obj0 = 0 ; - doubleArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_doubleArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - intArray *result = 0 ; - - 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 ); - 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 * obj0 = 0 ; - - 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 *""'"); - } - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - 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); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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); - 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(obj2, &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 * obj0 = 0 ; - int *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:intArray_cast",&obj0)) 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_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 * obj0 = 0 ; - intArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:intArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 (!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 ); - 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 * obj0 = 0 ; - - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - short result; - - if (!PyArg_ParseTuple(args,(char *)"OO:shortArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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(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)); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(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); - 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 * obj0 = 0 ; - short *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:shortArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 * obj0 = 0 ; - shortArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:shortArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 (!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) { - PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - longArray *result = 0 ; - - 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 ); - 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 * obj0 = 0 ; - - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"OO:longArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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(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)); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(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); - 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 * obj0 = 0 ; - long *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:longArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &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 * obj0 = 0 ; - longArray *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 *""'"); - } - 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 (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_longArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -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 * obj0 = 0 ; - - 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]; - } - { - 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_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 (!PyArg_ParseTuple(args,(char *)":get_local_real_format")) 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_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 (!PyArg_ParseTuple(args,(char *)":get_local_integer_byte_order")) 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_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; - } - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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); - 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(obj2, &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(obj3, &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(obj4, &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(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); - 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 (!PyArg_ParseTuple(args,(char *)":get_local_real_byte_order")) 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_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 * obj0 = 0 ; - - 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]; - } - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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 * obj0 = 0 ; - double (*result)[4] = 0 ; - - 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 (!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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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 *""'"); - } - 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 * obj0 = 0 ; - cbf_axis_struct *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 (!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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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: - 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 * obj0 = 0 ; - size_t result; - - 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 (!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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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 * obj0 = 0 ; - int 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 (!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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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""'"); - } - 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 * obj0 = 0 ; - double result; - - 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 (!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 * obj0 = 0 ; - PyObject * obj1 = 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 *""'"); - } - 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(); - 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 * obj0 = 0 ; - size_t result; - - 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 (!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 (!PyArg_ParseTuple(args,(char *)":new_cbf_positioner_struct")) 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 * obj0 = 0 ; - - 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 ); - 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_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))); - } 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - { - 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_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 * obj0 = 0 ; - - 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 ); - 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 *_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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 ); - 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(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); - { - 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 *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 *""'"); - } - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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 * 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 *""'"); - } - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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 * 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 *""'"); - } - 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 *""'"); - } - 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) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - size_t result; - - 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 ); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(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]""'"); - } - } - 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 * obj0 = 0 ; - size_t *result = 0 ; - - 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 ); - 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 (!PyArg_ParseTuple(args,(char *)":new_cbf_detector_struct")) 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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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""'"); - } - 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_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 *""'"); - } - 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 *""'"); - } - 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 *""'"); - } - 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 *""'"); - } - 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 *""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 ); - 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(obj1, &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(obj2, &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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(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); - 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_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 * 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 ); - 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; - } - } - resultobj = SWIG_Py_Void(); - 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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(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); - 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_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 * obj0 = 0 ; - - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_set_beam_center_fs",&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_set_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); - } - arg1 = (cbf_detector_struct *)(argp1); - { - 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(); - 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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - - 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 ); - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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""'"); - } - 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_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(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); - { - 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 *_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 ); - 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(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); - 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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - { - 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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(obj2, &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_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 * obj0 = 0 ; - - 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_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_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 ; - 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 ; - - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_set_reference_beam_center",&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_set_reference_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); - } - arg1 = (cbf_detector_struct *)(argp1); - { - 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(); - 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(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 * obj0 = 0 ; - PyObject * obj1 = 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(obj1, &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 *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) { - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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 * obj0 = 0 ; - cbf_node *result = 0 ; - - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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; - 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 * obj0 = 0 ; - int result; - - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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(); - 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 * obj0 = 0 ; - int result; - - 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 (!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 (!PyArg_ParseTuple(args,(char *)":new_cbf_handle_struct")) 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 * obj0 = 0 ; - - 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_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_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 *""'"); - } - 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 *""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(obj1, &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""'"); - } - 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""'"); - } - 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_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 *""'"); - } - 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 *""'"); - } - 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; - } - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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 ); - 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(obj1, &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(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); - 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_integervalue(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; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 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_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(obj1, &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_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 * obj0 = 0 ; - CBF_NODETYPE result; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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 (!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(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); - 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_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 *""'"); - } - 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; - } - } - 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) { - 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_read_template",&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_read_template" "', 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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 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 (!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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 ); - 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(obj1, &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(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); - 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_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 * 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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_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); - 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); - 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); - 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); - 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); - 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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 (!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(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); - 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_typeofvalue(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_get_typeofvalue",&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_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_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 * 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 ); - 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(obj1, &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(obj2, &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(obj3, &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(obj4, &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(obj5, &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(obj6, &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(obj7, &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(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); - 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_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 * obj0 = 0 ; - char *result = 0 ; - - 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_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_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 * obj0 = 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 (!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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_detector result; - - 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 ); - 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(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""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(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); - 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_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 ; - - 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 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_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(obj1, &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(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); - 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_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 * obj0 = 0 ; - 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 (!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_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; - } - } - resultobj = SWIG_Py_Void(); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(obj1, &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_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 * 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(obj1, &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(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""'"); - } - 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_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_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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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 ); - 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(obj1, &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(obj2, &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(obj3, &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_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 * obj0 = 0 ; - - 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_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_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 ; - - 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 (!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(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); - 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_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_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_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_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_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_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_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_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_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_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_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 * obj0 = 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 (!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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - 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_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(obj1, &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_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 ; - - 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_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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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 (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,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 *_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 * obj0 = 0 ; - PyObject * obj1 = 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_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(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); - { - 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_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 * obj0 = 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 (!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 ); - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 ; - unsigned int result; - - 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 (!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_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 * 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 ); - 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(obj1, &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(obj2, &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(obj3, &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(obj4, &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(obj5, &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(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""'"); - } - 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""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(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); - { - 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_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; - } - } - 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_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 * 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 ); - 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(obj1, &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(obj2, &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(obj3, &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(obj4, &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(obj5, &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(obj6, &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(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); - 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_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 *""'"); - } - 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 *""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *result = 0 ; - - 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_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(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""'"); - } - 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_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 * 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_positioner result; - - 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_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(obj1, &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_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 *""'"); - } - 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 *""'"); - } - 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_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 * obj0 = 0 ; - - 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_sf",&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_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_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 *""'"); - } - 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; - } - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(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""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - 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_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(obj1, &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(obj2, &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(obj3, &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(obj4, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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 *""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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_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(obj1, &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_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 * 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - unsigned int result; - - 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 ); - 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_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 * obj0 = 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(obj1, &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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - double result; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - unsigned int result; - - 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_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_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 * 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *result = 0 ; - - 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_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(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); - { - 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_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_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 *""'"); - } - 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,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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - unsigned int result; - - 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_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_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 * 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 ); - 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(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); - 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_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 * 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 ); - 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(obj1, &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""'"); - } - arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &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(obj5, &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(obj6, &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(obj7, &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""'"); - } - 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_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 * obj0 = 0 ; - unsigned int result; - - 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_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_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 * obj0 = 0 ; - - 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_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_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 ; - - 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_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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - cbf_goniometer result; - - 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_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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - - 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 (!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(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",&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" "', 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" "', 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" "', 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_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 * obj0 = 0 ; - - 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 ); - 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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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); - { - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 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_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(obj1, &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(obj2, &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(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,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_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 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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 (!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(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); - 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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_detector result; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(obj1, &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(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); - 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_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 * 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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_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(obj1, &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(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""'"); - } - 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_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_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_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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - - 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_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_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 * 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_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 * obj0 = 0 ; - - 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 ); - 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_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 ; - - 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 ); - 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_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 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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 ); - 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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - 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_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(obj1, &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(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""'"); - } - 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_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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - 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_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(obj1, &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(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""'"); - } - 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_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_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_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_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 ; - - 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 (!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_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 * obj0 = 0 ; - - 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 ); - 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_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 ; - char *result = 0 ; - - 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_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_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 ; - - 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_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_dictionary(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 ; - cbf_handle result; - - 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 ); - 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_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 * obj0 = 0 ; - 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_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_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; - } - } - 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_saveframe(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_remove_saveframe",&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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 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 (!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(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); - 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_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 * obj0 = 0 ; - unsigned int result; - - 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 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 (!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(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); - 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_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 * obj0 = 0 ; - double 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(obj1, &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_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 * 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 ); - 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(obj1, &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(obj2, &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""'"); - } - 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""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - - 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_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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 (!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(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); - 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_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 * 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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 ); - 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(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); - 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_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 *""'"); - } - 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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - 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 (!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); - { - 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_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 * 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - 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_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(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); - { - 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_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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - - 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_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_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 ; - char *result = 0 ; - - 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_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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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); - { - 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_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 * obj0 = 0 ; - PyObject * obj1 = 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_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(obj1, &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_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 * obj0 = 0 ; - - 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 (!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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - 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 ); - 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(obj1, &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(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""'"); - } - 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); - 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(obj5, &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(obj6, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - 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_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(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 *""'"); - } - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - 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_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(obj1, &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(obj2, &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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 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 (!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(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); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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 ); - 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(obj1, &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_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 * obj0 = 0 ; - - 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_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_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 * 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 ); - 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(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); - { - 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_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 * obj0 = 0 ; - - 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 (!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_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 * obj0 = 0 ; - - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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_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 * obj0 = 0 ; - - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - 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 ); - 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_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 * obj0 = 0 ; - PyObject * obj1 = 0 ; - - 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_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(obj1, &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 *cbf_handle_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cbf_handle_struct, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -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 *)"compute_reciprocal_cell", _wrap_compute_reciprocal_cell, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"get_local_real_format", _wrap_get_local_real_format, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"get_local_integer_byte_order", _wrap_get_local_integer_byte_order, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"airy_disk_volume", _wrap_airy_disk_volume, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"airy_disk", _wrap_airy_disk, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"get_local_real_byte_order", _wrap_get_local_real_byte_order, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"compute_cell_volume", _wrap_compute_cell_volume, METH_VARARGS, (char *)"\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" - ""}, - { (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_rotate_vector", _wrap_cbf_positioner_struct_rotate_vector, METH_VARARGS, (char *)"\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 *)"cbf_positioner_struct_get_goniometer_poise", _wrap_cbf_positioner_struct_get_goniometer_poise, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_positioner_struct_get_rotation_axis", _wrap_cbf_positioner_struct_get_rotation_axis, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_positioner_struct_get_rotation_range", _wrap_cbf_positioner_struct_get_rotation_range, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_positioner_struct_get_reciprocal", _wrap_cbf_positioner_struct_get_reciprocal, METH_VARARGS, (char *)"\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" - "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" - "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 *)"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_get_detector_axis_fast", _wrap_cbf_detector_struct_get_detector_axis_fast, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_pixel_area_fs", _wrap_cbf_detector_struct_get_pixel_area_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_set_reference_beam_center_fs", _wrap_cbf_detector_struct_set_reference_beam_center_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_pixel_area", _wrap_cbf_detector_struct_get_pixel_area, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "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", _wrap_cbf_detector_struct_get_pixel_coordinates, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_set_beam_center", _wrap_cbf_detector_struct_set_beam_center, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_beam_center_fs", _wrap_cbf_detector_struct_get_beam_center_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_pixel_area_sf", _wrap_cbf_detector_struct_get_pixel_area_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_set_beam_center_fs", _wrap_cbf_detector_struct_set_beam_center_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_set_beam_center_sf", _wrap_cbf_detector_struct_set_beam_center_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_detector_axes", _wrap_cbf_detector_struct_get_detector_axes, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_beam_center_sf", _wrap_cbf_detector_struct_get_beam_center_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_detector_distance", _wrap_cbf_detector_struct_get_detector_distance, METH_VARARGS, (char *)"\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" - ""}, - { (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_pixel_coordinates_sf", _wrap_cbf_detector_struct_get_pixel_coordinates_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_detector_axes_sf", _wrap_cbf_detector_struct_get_detector_axes_sf, METH_VARARGS, (char *)"\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_normal", _wrap_cbf_detector_struct_get_pixel_normal, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_set_reference_beam_center_sf", _wrap_cbf_detector_struct_set_reference_beam_center_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_pixel_coordinates_fs", _wrap_cbf_detector_struct_get_pixel_coordinates_fs, METH_VARARGS, (char *)"\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" - ""}, - { (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_inferred_pixel_size_sf", _wrap_cbf_detector_struct_get_inferred_pixel_size_sf, METH_VARARGS, (char *)"\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" - "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_beam_center", _wrap_cbf_detector_struct_get_beam_center, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_pixel_normal_fs", _wrap_cbf_detector_struct_get_pixel_normal_fs, METH_VARARGS, (char *)"\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" - ""}, - { (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_set_reference_beam_center", _wrap_cbf_detector_struct_set_reference_beam_center, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_detector_struct_get_inferred_pixel_size", _wrap_cbf_detector_struct_get_inferred_pixel_size, METH_VARARGS, (char *)"\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" - "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_inferred_pixel_size_fs", _wrap_cbf_detector_struct_get_inferred_pixel_size_fs, METH_VARARGS, (char *)"\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" - "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_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_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_get_real_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_real_3d_image_sf_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_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_doublevalue", _wrap_cbf_handle_struct_set_doublevalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_datablockname", _wrap_cbf_handle_struct_set_datablockname, METH_VARARGS, (char *)"\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" - "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_timestamp", _wrap_cbf_handle_struct_get_timestamp, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_real_image_fs", _wrap_cbf_handle_struct_set_real_image_fs, METH_VARARGS, (char *)"\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 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_get_integervalue", _wrap_cbf_handle_struct_get_integervalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_rotation", _wrap_cbf_handle_struct_get_axis_rotation, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_rewind_blockitem", _wrap_cbf_handle_struct_rewind_blockitem, METH_VARARGS, (char *)"\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" - ""}, - { (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_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_read_template", _wrap_cbf_handle_struct_read_template, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_select_column", _wrap_cbf_handle_struct_select_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_find_datablock", _wrap_cbf_handle_struct_find_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "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" - ""}, - { (char *)"cbf_handle_struct_set_real_3d_image", _wrap_cbf_handle_struct_set_real_3d_image, 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 (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_set_real_image", _wrap_cbf_handle_struct_set_real_image, METH_VARARGS, (char *)"\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 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_get_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_3d_image_sf_as_string, METH_VARARGS, (char *)"\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 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_tag_category", _wrap_cbf_handle_struct_set_tag_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_typeofvalue", _wrap_cbf_handle_struct_get_typeofvalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_3d_image_sf", _wrap_cbf_handle_struct_set_3d_image_sf, METH_VARARGS, (char *)"\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 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_datablock_name", _wrap_cbf_handle_struct_datablock_name, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_construct_reference_detector", _wrap_cbf_handle_struct_construct_reference_detector, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_typeofvalue", _wrap_cbf_handle_struct_set_typeofvalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_find_column", _wrap_cbf_handle_struct_find_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_column", _wrap_cbf_handle_struct_require_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_category_root", _wrap_cbf_handle_struct_set_category_root, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_diffrn_id", _wrap_cbf_handle_struct_get_diffrn_id, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (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_set_real_3d_image_fs", _wrap_cbf_handle_struct_set_real_3d_image_fs, METH_VARARGS, (char *)"\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 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_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_get_image_as_string", _wrap_cbf_handle_struct_get_image_as_string, METH_VARARGS, (char *)"\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 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" - "\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" - ""}, - { (char *)"cbf_handle_struct_get_divergence", _wrap_cbf_handle_struct_get_divergence, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_rewind_column", _wrap_cbf_handle_struct_rewind_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_pixel_size_sf", _wrap_cbf_handle_struct_get_pixel_size_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_image_sf", _wrap_cbf_handle_struct_set_image_sf, METH_VARARGS, (char *)"\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 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_get_polarization", _wrap_cbf_handle_struct_get_polarization, METH_VARARGS, (char *)"\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" - ""}, - { (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_set_reciprocal_cell", _wrap_cbf_handle_struct_set_reciprocal_cell, METH_VARARGS, (char *)"\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 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" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_reciprocal_cell_esd", _wrap_cbf_handle_struct_set_reciprocal_cell_esd, METH_VARARGS, (char *)"\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 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" - "\n" - ""}, - { (char *)"cbf_handle_struct_construct_positioner", _wrap_cbf_handle_struct_construct_positioner, METH_VARARGS, (char *)"\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. 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" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_unit_cell", _wrap_cbf_handle_struct_set_unit_cell, METH_VARARGS, (char *)"\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 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. 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_set_unit_cell_esd", _wrap_cbf_handle_struct_set_unit_cell_esd, METH_VARARGS, (char *)"\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 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. 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_set_crystal_id", _wrap_cbf_handle_struct_set_crystal_id, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_diffrn_id", _wrap_cbf_handle_struct_set_diffrn_id, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "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" - "\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" - ""}, - { (char *)"cbf_handle_struct_set_realarray_wdims_sf", _wrap_cbf_handle_struct_set_realarray_wdims_sf, METH_VARARGS, (char *)"\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" - ""}, - { (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_get_axis_equipment", _wrap_cbf_handle_struct_get_axis_equipment, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_value", _wrap_cbf_handle_struct_set_value, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_new_category", _wrap_cbf_handle_struct_new_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_image_fs", _wrap_cbf_handle_struct_set_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 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 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_find_nextrow", _wrap_cbf_handle_struct_find_nextrow, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_select_row", _wrap_cbf_handle_struct_select_row, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_ancestor", _wrap_cbf_handle_struct_get_axis_ancestor, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_image", _wrap_cbf_handle_struct_set_image, METH_VARARGS, (char *)"\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" - "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_axis_poise", _wrap_cbf_handle_struct_get_axis_poise, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_construct_reference_positioner", _wrap_cbf_handle_struct_construct_reference_positioner, METH_VARARGS, (char *)"\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. 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" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_find_category", _wrap_cbf_handle_struct_find_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf, METH_VARARGS, (char *)"\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" - ""}, - { (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_set_integerarray", _wrap_cbf_handle_struct_set_integerarray, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_find_row", _wrap_cbf_handle_struct_find_row, METH_VARARGS, (char *)"\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" - ""}, - { (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_get_real_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_real_3d_image_fs_as_string, METH_VARARGS, (char *)"\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 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_real_image_as_string", _wrap_cbf_handle_struct_get_real_image_as_string, METH_VARARGS, (char *)"\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 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_force_new_datablock", _wrap_cbf_handle_struct_force_new_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (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_count_axis_ancestors", _wrap_cbf_handle_struct_count_axis_ancestors, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_pixel_size", _wrap_cbf_handle_struct_set_pixel_size, 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 (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_get_element_id", _wrap_cbf_handle_struct_get_element_id, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims_fs", _wrap_cbf_handle_struct_set_integerarray_wdims_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_3d_image_size_sf", _wrap_cbf_handle_struct_get_3d_image_size_sf, 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_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" - ""}, - { (char *)"cbf_handle_struct_count_elements", _wrap_cbf_handle_struct_count_elements, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_next_column", _wrap_cbf_handle_struct_next_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_read_widefile", _wrap_cbf_handle_struct_read_widefile, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_find_tag_category", _wrap_cbf_handle_struct_find_tag_category, METH_VARARGS, (char *)"\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" - ""}, - { (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_remove_category", _wrap_cbf_handle_struct_remove_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs, 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_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" - ""}, - { (char *)"cbf_handle_struct_get_image_sf_as_string", _wrap_cbf_handle_struct_get_image_sf_as_string, METH_VARARGS, (char *)"\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 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_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_force_new_category", _wrap_cbf_handle_struct_force_new_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_setting", _wrap_cbf_handle_struct_get_axis_setting, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_offset", _wrap_cbf_handle_struct_get_axis_offset, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_count_rows", _wrap_cbf_handle_struct_count_rows, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_timestamp", _wrap_cbf_handle_struct_set_timestamp, METH_VARARGS, (char *)"\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_require_column_doublevalue", _wrap_cbf_handle_struct_require_column_doublevalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_column_value", _wrap_cbf_handle_struct_require_column_value, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_next_category", _wrap_cbf_handle_struct_next_category, METH_VARARGS, (char *)"\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" - ""}, - { (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_get_axis_type", _wrap_cbf_handle_struct_get_axis_type, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_count_columns", _wrap_cbf_handle_struct_count_columns, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims", _wrap_cbf_handle_struct_set_integerarray_wdims, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_orientation_matrix", _wrap_cbf_handle_struct_set_orientation_matrix, METH_VARARGS, (char *)"\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. 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_count_categories", _wrap_cbf_handle_struct_count_categories, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_rewind_datablock", _wrap_cbf_handle_struct_rewind_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_remove_row", _wrap_cbf_handle_struct_remove_row, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_rewind_row", _wrap_cbf_handle_struct_rewind_row, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_construct_goniometer", _wrap_cbf_handle_struct_construct_goniometer, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_reset_saveframe", _wrap_cbf_handle_struct_reset_saveframe, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters", _wrap_cbf_handle_struct_get_realarrayparameters, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_pixel_size", _wrap_cbf_handle_struct_get_pixel_size, METH_VARARGS, (char *)"\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" - ""}, - { (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_gain", _wrap_cbf_handle_struct_get_gain, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_category_name", _wrap_cbf_handle_struct_category_name, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_force_new_saveframe", _wrap_cbf_handle_struct_force_new_saveframe, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "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" - ""}, - { (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_rewind_saveframe", _wrap_cbf_handle_struct_rewind_saveframe, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_realarray_as_string", _wrap_cbf_handle_struct_get_realarray_as_string, METH_VARARGS, (char *)"\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 -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. 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" - ""}, - { (char *)"cbf_handle_struct_write_widefile", _wrap_cbf_handle_struct_write_widefile, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_reset_category", _wrap_cbf_handle_struct_reset_category, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_bin_sizes", _wrap_cbf_handle_struct_set_bin_sizes, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_construct_detector", _wrap_cbf_handle_struct_construct_detector, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_realarray", _wrap_cbf_handle_struct_set_realarray, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_realarray_wdims", _wrap_cbf_handle_struct_set_realarray_wdims, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_3d_image_as_string", _wrap_cbf_handle_struct_get_3d_image_as_string, METH_VARARGS, (char *)"\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 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_require_doublevalue", _wrap_cbf_handle_struct_require_doublevalue, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "\n" - ""}, - { (char *)"cbf_handle_struct_require_reference_detector", _wrap_cbf_handle_struct_require_reference_detector, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_remove_datablock", _wrap_cbf_handle_struct_remove_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_next_row", _wrap_cbf_handle_struct_next_row, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_remove_column", _wrap_cbf_handle_struct_remove_column, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_axis_setting", _wrap_cbf_handle_struct_set_axis_setting, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_real_image_sf_as_string", _wrap_cbf_handle_struct_get_real_image_sf_as_string, METH_VARARGS, (char *)"\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 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_axis_depends_on", _wrap_cbf_handle_struct_get_axis_depends_on, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_value", _wrap_cbf_handle_struct_require_value, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_image_fs_as_string", _wrap_cbf_handle_struct_get_image_fs_as_string, METH_VARARGS, (char *)"\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 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_row", _wrap_cbf_handle_struct_new_row, METH_VARARGS, (char *)"\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_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_value", _wrap_cbf_handle_struct_get_value, METH_VARARGS, (char *)"\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" - ""}, - { (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" - "\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. 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_dictionary", _wrap_cbf_handle_struct_get_dictionary, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_column_name", _wrap_cbf_handle_struct_column_name, METH_VARARGS, (char *)"\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" - ""}, - { (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_remove_saveframe", _wrap_cbf_handle_struct_remove_saveframe, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_polarization", _wrap_cbf_handle_struct_set_polarization, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_wavelength", _wrap_cbf_handle_struct_set_wavelength, METH_VARARGS, (char *)"\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 AA to wavelength.\n" - "ARGUMENTS\n" - "handle CBF handle. wavelength Wavelength in AA.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_row_number", _wrap_cbf_handle_struct_row_number, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_vector", _wrap_cbf_handle_struct_get_axis_vector, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_doublevalue", _wrap_cbf_handle_struct_get_doublevalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_current_timestamp", _wrap_cbf_handle_struct_set_current_timestamp, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_3d_image", _wrap_cbf_handle_struct_set_3d_image, METH_VARARGS, (char *)"\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 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_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" - "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_rewind_category", _wrap_cbf_handle_struct_rewind_category, METH_VARARGS, (char *)"\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" - ""}, - { (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_get_bin_sizes", _wrap_cbf_handle_struct_get_bin_sizes, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims_sf", _wrap_cbf_handle_struct_set_integerarray_wdims_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_tag_root", _wrap_cbf_handle_struct_require_tag_root, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_axis_equipment_component", _wrap_cbf_handle_struct_get_axis_equipment_component, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_pixel_size_fs", _wrap_cbf_handle_struct_get_pixel_size_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_pixel_size_sf", _wrap_cbf_handle_struct_set_pixel_size_sf, 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_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" - ""}, - { (char *)"cbf_handle_struct_set_datestamp", _wrap_cbf_handle_struct_set_datestamp, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_integration_time", _wrap_cbf_handle_struct_set_integration_time, METH_VARARGS, (char *)"\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 \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_get_axis_rotation_axis", _wrap_cbf_handle_struct_get_axis_rotation_axis, METH_VARARGS, (char *)"\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" - ""}, - { (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_delete_row", _wrap_cbf_handle_struct_delete_row, METH_VARARGS, (char *)"\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_get_real_image_fs_as_string", _wrap_cbf_handle_struct_get_real_image_fs_as_string, METH_VARARGS, (char *)"\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 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_dictionary", _wrap_cbf_handle_struct_set_dictionary, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_3d_image_fs_as_string, METH_VARARGS, (char *)"\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 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_datestamp", _wrap_cbf_handle_struct_get_datestamp, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_crystal_id", _wrap_cbf_handle_struct_get_crystal_id, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_image_size_sf", _wrap_cbf_handle_struct_get_image_size_sf, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_datablock", _wrap_cbf_handle_struct_require_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_unit_cell", _wrap_cbf_handle_struct_get_unit_cell, METH_VARARGS, (char *)"\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. 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" - ""}, - { (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_set_real_image_sf", _wrap_cbf_handle_struct_set_real_image_sf, METH_VARARGS, (char *)"\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 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_select_category", _wrap_cbf_handle_struct_select_category, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_new_saveframe", _wrap_cbf_handle_struct_new_saveframe, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integerarray_as_string", _wrap_cbf_handle_struct_get_integerarray_as_string, METH_VARARGS, (char *)"\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 -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. 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" - ""}, - { (char *)"cbf_handle_struct_find_category_root", _wrap_cbf_handle_struct_find_category_root, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_overload", _wrap_cbf_handle_struct_set_overload, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_require_column_integervalue", _wrap_cbf_handle_struct_require_column_integervalue, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_new_datablock", _wrap_cbf_handle_struct_new_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integration_time", _wrap_cbf_handle_struct_get_integration_time, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_set_realarray_wdims_fs", _wrap_cbf_handle_struct_set_realarray_wdims_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_reset_datablocks", _wrap_cbf_handle_struct_reset_datablocks, METH_VARARGS, (char *)"\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" - ""}, - { (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_get_image_size_fs", _wrap_cbf_handle_struct_get_image_size_fs, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters", _wrap_cbf_handle_struct_get_integerarrayparameters, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_select_datablock", _wrap_cbf_handle_struct_select_datablock, METH_VARARGS, (char *)"\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" - ""}, - { (char *)"cbf_handle_struct_swigregister", cbf_handle_struct_swigregister, METH_VARARGS, NULL}, - { 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 %d\n", 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 %d %s\n", 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 %d %s\n", 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 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; - 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 = { - /* 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 */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* 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 */ -#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 -#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; - } - - /* 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, 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); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_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; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#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; -#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, - 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 = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) 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; - 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; - - /* 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); - assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); -#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((char *) SWIG_name, SwigMethods); -#endif - - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - 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) { - 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/pycbf/win32.bat b/pycbf/win32.bat index f13ba1ff..f1decd92 100644 --- a/pycbf/win32.bat +++ b/pycbf/win32.bat @@ -1,10 +1,9 @@ nuweb pycbf -latex pycbf -nuweb pycbf -latex pycbf -dvipdfm pycbf +pdflatex pycbf +pdflatex pycbf nuweb pycbf +pdflatex 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 diff --git a/src/cbf.stx.y b/src/cbf.stx.y index 4caeb220..7a202eb8 100644 --- a/src/cbf.stx.y +++ b/src/cbf.stx.y @@ -263,20 +263,13 @@ extern "C" { #include "cbf_tree.h" #include "cbf_alloc.h" #include "cbf_context.h" +#include "cbf_lex.h" +#include "cbf_stx.h" #include "cbf_ws.h" #define yyparse cbf_parse #define yylex cbf_lex_wrapper #define yyerror(dummy,x) cbf_syntax_error(((cbf_handle)(((void **)context)[2])),(x)) -typedef union -{ - int errorcode; - const char *text; - cbf_node *node; -} YYSTYPE; -#define YYSTYPE_IS_DECLARED - -#include "cbf_stx.h" #ifdef alloca #undef alloca @@ -287,7 +280,6 @@ typedef union #define YYINITDEPTH 200 #define YYMAXDEPTH 200 -int cbf_lex (cbf_handle handle, YYSTYPE *val ); /* vcontext[0] -- (void *)file vcontext[1] -- (void *)handle->node @@ -304,6 +296,8 @@ static int cbf_lex_wrapper (void *val, void *vcontext) cbf_file *cbffile; + CBF_UNUSED( cbffile ); + do { @@ -338,16 +332,10 @@ static int cbf_syntax_error (cbf_handle handle, const char *message) %defines %lex-param {void * context} %parse-param {void * context} -%pure-parser +%define api.pure full +%define api.value.type {union _cbf_stype} %token-table -%union -{ - int errorcode; - const char *text; - cbf_node *node; -} - %token DATA %token DEFINE %token SAVE diff --git a/src/cbf_lex.c b/src/cbf_lex.c index 788e2492..fe467653 100644 --- a/src/cbf_lex.c +++ b/src/cbf_lex.c @@ -262,6 +262,7 @@ extern "C" { #include "cbf_read_binary.h" #include "cbf_read_mime.h" #include "cbf_alloc.h" +#include "cbf_stx.h" #include "cbf_ws.h" #include diff --git a/src/cbf_stx.c b/src/cbf_stx.c deleted file mode 100644 index 76d9f48f..00000000 --- a/src/cbf_stx.c +++ /dev/null @@ -1,3057 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - 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 3 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ - - - -/********************************************************************** - * cbf.stx -- cbf parser * - * * - * Version 0.7.7 19 February 2007 * - * * - * Paul Ellis and * - * Herbert J. Bernstein (yaya@bernstein-plus-sons.com) * - * * - * (C) Copyright 2006, 2007 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 * - **********************************************************************/ - -#ifdef __cplusplus - -extern "C" { - -#endif - -#include -#include -#include - -#include "cbf.h" -#include "cbf_tree.h" -#include "cbf_alloc.h" -#include "cbf_context.h" -#include "cbf_ws.h" - -#define yyparse cbf_parse -#define yylex cbf_lex_wrapper -#define yyerror(dummy,x) cbf_syntax_error(((cbf_handle)(((void **)context)[2])),(x)) -typedef union -{ - int errorcode; - const char *text; - cbf_node *node; -} YYSTYPE; -#define YYSTYPE_IS_DECLARED - -#include "cbf_stx.h" - -#ifdef alloca -#undef alloca -#endif - -#define alloca(x) (NULL) - -#define YYINITDEPTH 200 -#define YYMAXDEPTH 200 - -int cbf_lex (cbf_handle handle, YYSTYPE *val ); -/* - vcontext[0] -- (void *)file - vcontext[1] -- (void *)handle->node - vcontext[2] -- (void *)handle - vcontext[3] -- (void *)node -*/ - - -static int cbf_lex_wrapper (void *val, void *vcontext) -{ - enum yytokentype token; - - cbf_handle cbfhandle; - - cbf_file *cbffile; - - CBF_UNUSED( cbffile ); - - do { - - cbffile = (cbf_file*)((void **) vcontext) [0]; - - cbfhandle = (cbf_handle)((void **) vcontext) [2]; - - token = cbf_lex (cbfhandle, (YYSTYPE *)val); - - if ( token == COMMENT && ((YYSTYPE *)val)->text ) { - - cbf_free_text(&(((YYSTYPE *)val)->text),NULL); - - } - - } while (token == COMMENT); - - return token; -} - -static int cbf_syntax_error (cbf_handle handle, const char *message) -{ - - cbf_log( handle, message, CBF_LOGERROR|CBF_LOGSTARTLOC ); - return 0; -} - - - - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "cbf.stx.tab.h". */ -#ifndef YY_YY_SRC_CBF_STX_TAB_H_INCLUDED -# define YY_YY_SRC_CBF_STX_TAB_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - DATA = 258, - DEFINE = 259, - SAVE = 260, - SAVEEND = 261, - LOOP = 262, - ITEM = 263, - CATEGORY = 264, - COLUMN = 265, - STRING = 266, - CBFWORD = 267, - BINARY = 268, - UNKNOWN = 269, - COMMENT = 270, - ERROR = 271 - }; -#endif - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - - - int errorcode; - const char *text; - cbf_node *node; - - - -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void * context); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_YY_SRC_CBF_STX_TAB_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - - - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 25 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 82 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 17 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 33 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 72 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 85 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 271 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 7, 8, 11, 14, 16, 18, - 20, 22, 24, 26, 28, 31, 34, 37, 39, 41, - 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, - 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, - 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, - 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, - 163, 166, 169, 173, 175, 177, 179, 181, 183, 185, - 187, 189, 191 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 18, 0, -1, 19, -1, 22, -1, -1, 18, 43, - -1, 23, 43, -1, 19, -1, 20, -1, 27, -1, - 32, -1, 24, -1, 41, -1, 28, -1, 22, 44, - -1, 23, 44, -1, 21, 44, -1, 35, -1, 40, - -1, 36, -1, 23, 6, -1, 22, 45, -1, 21, - 45, -1, 25, 45, -1, 26, 45, -1, 25, 46, - -1, 26, 47, -1, 22, 47, -1, 21, 47, -1, - 26, 49, -1, 27, 49, -1, 28, 49, -1, 29, - 49, -1, 22, 42, -1, 21, 42, -1, 29, 42, - -1, 29, 45, -1, 31, 45, -1, 29, 47, -1, - 31, 47, -1, 30, 46, -1, 31, 49, -1, 32, - 49, -1, 23, 45, -1, 33, 45, -1, 34, 45, - -1, 33, 46, -1, 23, 47, -1, 34, 47, -1, - 34, 49, -1, 35, 49, -1, 36, 49, -1, 37, - 49, -1, 23, 42, -1, 37, 42, -1, 37, 45, - -1, 39, 45, -1, 37, 47, -1, 39, 47, -1, - 38, 46, -1, 39, 49, -1, 40, 49, -1, 22, - 48, 49, -1, 7, -1, 3, -1, 5, -1, 9, - -1, 10, -1, 8, -1, 4, -1, 11, -1, 12, - -1, 13, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 401, 401, 404, 412, 417, 445, 479, 493, 496, - 508, 520, 531, 543, 557, 571, 595, 610, 618, 626, - 636, 651, 661, 673, 689, 707, 718, 738, 752, 770, - 783, 794, 805, 819, 824, 829, 840, 855, 871, 891, - 909, 929, 941, 956, 963, 977, 991, 999, 1012, 1034, - 1047, 1056, 1064, 1077, 1082, 1092, 1103, 1119, 1135, 1151, - 1168, 1178, 1190, 1208, 1211, 1216, 1221, 1226, 1231, 1236, - 1241, 1244, 1247 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "DATA", "DEFINE", "SAVE", "SAVEEND", - "LOOP", "ITEM", "CATEGORY", "COLUMN", "STRING", "CBFWORD", "BINARY", - "UNKNOWN", "COMMENT", "ERROR", "$accept", "cbf", "cbfstart", - "CbfThruDBName", "ErrorCbfWODBName", "CbfThruDBElement", - "CbfThruSFElement", "CbfThruSaveFrame", "CbfThruCategory", - "CbfThruColumn", "CbfThruAssignment", "ErrorCbfThruExtraValue", - "CbfThruLoopStart", "CbfThruLoopCategory", "CbfThruLoopColumn", - "CbfThruLoopAssignment", "CbfThruSFCategory", "CbfThruSFColumn", - "CbfThruSFAssignment", "ErrorCbfThruExtraSFValue", "CbfThruSFLoopStart", - "CbfThruSFLoopCategory", "CbfThruSFLoopColumn", - "CbfThruSFLoopAssignment", "CbfThruFunction", "Loop", "DataBlockName", - "SaveFrameName", "CategoryName", "ColumnName", "ItemName", - "FunctionName", "Value", YY_NULL -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 17, 18, 18, 19, 20, 20, 21, 22, 22, - 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, - 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, - 28, 28, 28, 29, 29, 29, 30, 30, 31, 31, - 31, 32, 32, 33, 33, 33, 34, 34, 34, 35, - 36, 36, 36, 37, 37, 38, 38, 39, 39, 39, - 40, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 49, 49 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 0, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 4, 0, 7, 8, 0, 3, 0, 11, 0, 0, - 9, 13, 0, 0, 0, 10, 0, 0, 17, 19, - 0, 0, 0, 18, 12, 1, 64, 5, 65, 63, - 68, 66, 34, 16, 22, 28, 69, 33, 14, 21, - 27, 0, 20, 53, 6, 15, 43, 47, 67, 23, - 25, 70, 71, 72, 24, 26, 29, 30, 31, 35, - 36, 38, 32, 40, 37, 39, 41, 42, 44, 46, - 45, 48, 49, 50, 51, 54, 55, 57, 52, 59, - 56, 58, 60, 61, 62 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 32, 27, 33, 34, 50, - 35, 41, 56 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -11 -static const yytype_int8 yypact[] = -{ - -11, 3, 11, -11, 70, 59, 46, -11, 29, 61, - 69, 69, 49, 13, 61, 69, 29, 61, 69, 69, - 49, 13, 61, 69, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, 69, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, 23, 15, 41, 10, 4, - 28, -11, -10 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -3 -static const yytype_int8 yytable[] = -{ - 57, 58, 62, 25, 66, 67, 26, 72, 73, 74, - 78, -2, 82, 83, -2, 39, 46, 63, 49, 54, - 69, 44, 60, 48, 64, 79, 68, 70, 37, 43, - 76, 84, 80, 40, 47, 59, 0, 55, 31, 48, - 61, 0, 65, 75, 0, 71, 38, 45, 77, 26, - 81, 28, 42, 29, 30, 31, 29, 30, 31, 0, - 51, 52, 53, 36, 28, 0, 29, 30, 31, 30, - 31, 0, 51, 52, 53, 28, 0, 29, 30, 31, - 51, 52, 53 -}; - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-11))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - -static const yytype_int8 yycheck[] = -{ - 10, 11, 12, 0, 14, 15, 3, 17, 18, 19, - 20, 0, 22, 23, 3, 5, 6, 13, 8, 9, - 16, 6, 12, 10, 14, 21, 16, 17, 5, 6, - 20, 41, 22, 5, 6, 12, -1, 9, 9, 10, - 12, -1, 14, 20, -1, 17, 5, 6, 20, 3, - 22, 5, 6, 7, 8, 9, 7, 8, 9, -1, - 11, 12, 13, 4, 5, -1, 7, 8, 9, 8, - 9, -1, 11, 12, 13, 5, -1, 7, 8, 9, - 11, 12, 13 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 0, 3, 43, 5, 7, - 8, 9, 42, 44, 45, 47, 4, 42, 44, 45, - 47, 48, 6, 42, 43, 44, 45, 47, 10, 45, - 46, 11, 12, 13, 45, 47, 49, 49, 49, 42, - 45, 47, 49, 46, 45, 47, 49, 49, 45, 46, - 45, 47, 49, 49, 49, 42, 45, 47, 49, 46, - 45, 47, 49, 49, 49 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (context, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, context) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, context); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void * context) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - void * context; -#endif -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; - YYUSE (context); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void * context) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - void * context; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, context); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void * context) -#else -static void -yy_reduce_print (yyvsp, yyrule, context) - YYSTYPE *yyvsp; - int yyrule; - void * context; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , context); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, context); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void * context) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, context) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - void * context; -#endif -{ - YYUSE (yyvaluep); - YYUSE (context); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YYUSE (yytype); -} - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void * context) -#else -int -yyparse (context) - void * context; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - - { - (yyval.node) = (yyvsp[(1) - (1)].node); ((void **)context)[3] = NULL; - } - break; - - case 3: - - { - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_ROOT)); - } - break; - - case 4: - - { - (yyval.node) = ((void **) context) [1]; - } - break; - - case 5: - - { - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_DATABLOCK, - (cbf_node *) NULL)); - - if (strlen((yyvsp[(2) - (2)].text))==0) { - - cbf_log((cbf_handle)(((void **)context)[2]),"empty data block name", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - } - - - if (!cbf_find_last_child(&((yyval.node)),(yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].text)) ){ - - cbf_log((cbf_handle)(((void **)context)[2]),"duplicate data block name", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - } - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_DATABLOCK, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - } - break; - - case 6: - - { - cbf_log((cbf_handle)(((void **)context)[2]),"prior save frame not terminated", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_ROOT)); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_DATABLOCK, - (cbf_node *) NULL)); - - if (strlen((yyvsp[(2) - (2)].text))==0) { - - cbf_log((cbf_handle)(((void **)context)[2]),"empty data block name", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - } - - - if (!cbf_find_last_child(&((yyval.node)),(yyval.node),(yyvsp[(2) - (2)].text)) ){ - - cbf_log((cbf_handle)(((void **)context)[2]),"duplicate data block name", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - } - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_DATABLOCK, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - } - break; - - case 7: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (1)].node), CBF_DATABLOCK, NULL)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))) - - cbf_log((cbf_handle)(((void **)context)[2]),"no data block", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - } - break; - - case 8: - - { - (yyval.node) = (yyvsp[(1) - (1)].node); ((void **)context)[3] = NULL; - } - break; - - case 9: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)) - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = NULL; - } - break; - - case 10: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)) - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = NULL; - } - break; - - case 11: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)) - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = NULL; - } - break; - - case 12: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_FUNCTION, - NULL)) - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = NULL; - } - break; - - case 13: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)) - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = NULL; - } - break; - - case 14: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_CATEGORY, - NULL)) - - cbf_failnez (cbf_make_child (&((yyval.node)), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_SAVEFRAME, (yyvsp[(2) - (2)].text))) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))) - - ((void **)context)[3] = NULL; - - } - break; - - case 15: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_CATEGORY, - NULL)) - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_SAVEFRAME, - NULL)) - - cbf_log((cbf_handle)(((void **)context)[2]),"save frame not terminated", - CBF_LOGWARNING|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))) - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)) - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_SAVEFRAME, (yyvsp[(2) - (2)].text))) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))) - - ((void **)context)[3] = NULL; - - } - break; - - case 16: - - { - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_CATEGORY, - NULL)) - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_SAVEFRAME, (yyvsp[(2) - (2)].text))) - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))) - - ((void **)context)[3] = NULL; - - } - break; - - case 17: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)); - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - } - break; - - case 18: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)); - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - } - break; - - case 19: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (1)].node), CBF_CATEGORY, - NULL)); - - (yyval.node) = (yyvsp[(1) - (1)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - } - break; - - case 20: - - { - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_CATEGORY, - NULL)); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(1) - (2)].node), CBF_SAVEFRAME, - NULL)); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - - - } - break; - - case 21: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - ((void **)context)[3] = (void *)(yyval.node); - - } - break; - - case 22: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - ((void **)context)[3] = (void *)(yyval.node); - - } - break; - - case 23: - - { cbf_log ((cbf_handle)(((void **)context)[2]),"data name with no value1", - CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - ((void **)context)[3] = (void *)(yyval.node); - - } - break; - - case 24: - - { cbf_log ((cbf_handle)(((void **)context)[2]),"data name with no value", - CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - ((void **)context)[3] = (void *)(yyval.node); - - } - break; - - case 25: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - } - break; - - case 26: - - { cbf_log ((cbf_handle)(((void **)context)[2]),"data name with no value",CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_DATABLOCK)); - - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - } - break; - - case 27: - - { - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - } - break; - - case 28: - - { - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - } - break; - - case 29: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_set_columnrow ((yyval.node), 0, (yyvsp[(2) - (2)].text), 1)); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 30: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_log ((cbf_handle)(((void **)context)[2]),"value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)),NULL)); - - } - break; - - case 31: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_log ((cbf_handle)(((void **)context)[2]),"value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)),NULL)); - - } - break; - - case 32: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_log ((cbf_handle)(((void **)context)[2]),"loop value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)),NULL)); - - } - break; - - case 33: - - { - cbf_failnez (cbf_make_node (&((yyval.node)), CBF_LINK, NULL, NULL)); - - cbf_failnez (cbf_set_link ((yyval.node), (yyvsp[(1) - (2)].node))); - } - break; - - case 34: - - { - cbf_failnez (cbf_make_node (&((yyval.node)), CBF_LINK, NULL, NULL)); - - cbf_failnez (cbf_set_link ((yyval.node), (yyvsp[(1) - (2)].node))); - } - break; - - case 35: - - { - cbf_log ((cbf_handle)(((void **)context)[2]),"redundant \"loop_\" ",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez (cbf_make_node (&((yyval.node)), CBF_LINK, NULL, NULL)); - - cbf_failnez (cbf_set_link ((yyval.node), (yyvsp[(1) - (2)].node))); - } - break; - - case 36: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 37: - - { - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_DATABLOCK)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 38: - - { - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 39: - - { - (yyval.node) = ((void **)context)[3]; - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 40: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 41: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_shift_link ((yyval.node))); - - cbf_failnez (cbf_add_columnrow ((yyval.node), (yyvsp[(2) - (2)].text))); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 42: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_shift_link ((yyval.node))); - - cbf_failnez (cbf_add_columnrow ((yyval.node), (yyvsp[(2) - (2)].text))); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 43: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = (void *)(yyval.node); - } - break; - - case 44: - - { cbf_log((cbf_handle)(((void **)context)[2]), "data name with no value", CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = (void *)(yyval.node); - } - break; - - case 45: - - { cbf_log((cbf_handle)(((void **)context)[2]), "data name with no value", CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - ((void **)context)[3] = (void *)(yyval.node); - } - break; - - case 46: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - } - break; - - case 47: - - { - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - } - break; - - case 48: - - { - cbf_log((cbf_handle)(((void **)context)[2]), "data name with no value", CBF_LOGERROR|CBF_LOGSTARTLOC); - - (yyval.node) = (yyvsp[(1) - (2)].node); cbf_failnez (cbf_undo_links (&((yyval.node)))); - - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyval.node), CBF_SAVEFRAME)); - - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - } - break; - - case 49: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_set_columnrow ((yyval.node), 0, (yyvsp[(2) - (2)].text), 1)); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 50: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_log ((cbf_handle)(((void **)context)[2]),"value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)), NULL)); - - } - break; - - case 51: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_log ((cbf_handle)(((void **)context)[2]),"value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)), NULL)); - } - break; - - case 52: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_log ((cbf_handle)(((void **)context)[2]),"loop value without tag",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez(cbf_free_text(&((yyvsp[(2) - (2)].text)), NULL)); - - } - break; - - case 53: - - { - cbf_failnez (cbf_make_node (&((yyval.node)), CBF_LINK, NULL, NULL)); - - cbf_failnez (cbf_set_link ((yyval.node), (yyvsp[(1) - (2)].node))); - } - break; - - case 54: - - { - cbf_log ((cbf_handle)(((void **)context)[2]),"redundant \"loop_\" ",CBF_LOGERROR|CBF_LOGSTARTLOC); - - cbf_failnez (cbf_make_node (&((yyval.node)), CBF_LINK, NULL, NULL)); - - cbf_failnez (cbf_set_link ((yyval.node), (yyvsp[(1) - (2)].node))); - } - break; - - case 55: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - ((void **)context)[3] = (void *)(yyval.node); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 56: - - { - cbf_failnez (cbf_find_parent (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_SAVEFRAME)); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - ((void **)context)[3] = (void *)(yyval.node); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 57: - - { - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_CATEGORY, (yyvsp[(2) - (2)].text))); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, cbf_copy_string(NULL,(yyvsp[(2) - (2)].text),0))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 58: - - { - (yyval.node) = ((void **)context)[3]; - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyval.node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 59: - - { - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (2)].node), CBF_COLUMN, (yyvsp[(2) - (2)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyval.node), CBF_COLUMN, - (cbf_node *)(((void **)context)[3]))); - - cbf_failnez (cbf_set_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - cbf_failnez (cbf_add_link ((yyvsp[(1) - (2)].node), (yyval.node))); - - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 60: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_shift_link ((yyval.node))); - - cbf_failnez (cbf_add_columnrow ((yyval.node), (yyvsp[(2) - (2)].text))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 61: - - { - (yyval.node) = (yyvsp[(1) - (2)].node); - - cbf_failnez (cbf_shift_link ((yyval.node))); - - cbf_failnez (cbf_add_columnrow ((yyval.node), (yyvsp[(2) - (2)].text))); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(2) - (2)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 62: - - { - - cbf_failnez (cbf_make_new_child (&((yyval.node)), (yyvsp[(1) - (3)].node), CBF_FUNCTION, (yyvsp[(2) - (3)].text))); - - ((cbf_handle)(((void **)context)[2]))->node=(cbf_node *)(yyval.node); - - cbf_failnez(cbf_apply_ws((cbf_handle)(((void **)context)[2]))); - - ((void **)context)[3] = (void *)(yyval.node); - - cbf_failnez (cbf_make_child (&((yyval.node)), (yyvsp[(1) - (3)].node), CBF_COLUMN, (yyvsp[(2) - (3)].text))); - - cbf_failnez (cbf_set_columnrow ((yyval.node), 0, (yyvsp[(3) - (3)].text), 1)); - - cbf_failnez (cbf_validate ((cbf_handle)(((void **)context)[2]), (cbf_node *) (yyvsp[(3) - (3)].text), CBF_VALUE, - (cbf_node *) (yyval.node))); - } - break; - - case 64: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 65: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 66: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 67: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 68: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 69: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 70: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 71: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - case 72: - - { - (yyval.text) = (yyvsp[(1) - (1)].text); - } - break; - - - - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (context, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (context, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, context); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, context); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (context, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, context); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, context); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - - - -#ifdef __cplusplus - -} - -#endif