Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Feb 6, 2015
1 parent 4c80317 commit 7eca671
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion doc/source/performances.rst
Expand Up @@ -4,7 +4,7 @@ Benchmarks
Those benchmarks have been done with all data already in cache using a Intel Xeon E5520 @ 2.27GHz
running Debian 7.

.. table:: Execution time for reading a file, benchmarked using the ``timeit'' module. :label:`Benchmark`
.. table:: Execution time for reading a file, benchmarked using the ``timeit'' module.
:class: w

+---------------+---------------------------+--------+--------------+--------------+--------------+
Expand Down
7 changes: 4 additions & 3 deletions fabio-src/binaryimage.py
Expand Up @@ -2,6 +2,7 @@
# coding: utf-8
"""
Authors: Gael Goret, Jerome Kieffer, ESRF, France
Emails: gael.goret@esrf.fr, jerome.kieffer@esrf.fr
Brian Richard Pauw <brian@stack.nl>
Expand All @@ -28,8 +29,8 @@ class binaryimage(fabioimage):
"""
This simple library has been made for manipulating exotic/unknown files format.
Binary files images are simple none-compressed 2D images only defined by their :
data-type, dimensions, byte order and offset
Binary files images are simple none-compressed 2D images only defined by their:
data-type, dimensions, byte order and offset
if offset is set to a negative value, the image is read using the last data but n
data in the file, skipping any header.
Expand Down Expand Up @@ -74,7 +75,7 @@ def read(self, fname, dim1, dim2, offset=0, bytecode="int32", endian="<"):
f.seek(offset)
else:
try:
f.seek(-size + offset + 1, 2) #seek from EOF backwards
f.seek(-size + offset + 1, 2) # seek from EOF backwards
except IOError:
logging.warn('expected datablock too large, please check bytecode settings: {}'.format(bytecode))
except:
Expand Down
6 changes: 3 additions & 3 deletions fabio-src/cbfimage.py
Expand Up @@ -17,7 +17,7 @@
__author__ = "Jérôme Kieffer"
__contact__ = "jerome.kieffer@esrf.eu"
__license__ = "GPLv3+"
__date__ = "19/01/2015"
__date__ = "06/02/2015"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__version__ = ["Generated by CIF.py: Jan 2005 - April 2012",
"Written by Jerome Kieffer: Jerome.Kieffer@esrf.eu",
Expand Down Expand Up @@ -643,6 +643,7 @@ def saveCIF(self, _strFilename="test.cif", linesep=os.linesep, binary=False):
@param _strFilename: the of the file to be written
@param linesep: line separation used (to force compatibility with windows/unix)
@param binary: Shall we write the data as binary (True only for imageCIF/CBF)
@return: None
"""
if binary:
mode = "wb"
Expand All @@ -667,10 +668,9 @@ def tostring(self, _strFilename=None, linesep=os.linesep):
@param _strFilename: the name of the filename to be appended in the header of the CIF file
@type _strFilename: string
@param linesep: default line separation: can be "\n" or "\r\n"
@return: a sting that corresponds to the content of the CIF - file.
@return: a string that corresponds to the content of the CIF-file.
"""
# sCifText = ""
lstStrCif = ["# " + i for i in __version__]
if "_chemical_name_common" in self:
t = self["_chemical_name_common"].split()[0]
Expand Down
1 change: 1 addition & 0 deletions fabio-src/compression.py
Expand Up @@ -322,6 +322,7 @@ def decPCK(stream, dim1=None, dim2=None, overflowPix=None, version=None, normal_
@param normal_start: position of the normal value section (can be auto-guessed)
@param swap_needed: set to True when reading data from a foreign endianness (little on big or big on little)
@return : ndarray of 2D with the right size
"""
try:
from .mar345_IO import uncompress_pck
Expand Down
7 changes: 5 additions & 2 deletions fabio-src/mar345image.py
Expand Up @@ -23,7 +23,7 @@
from __future__ import with_statement, print_function, absolute_import

__authors__ = ["Henning O. Sorensen" , "Erik Knudsen", "Jon Wright", "Jérôme Kieffer"]
__date__ = "04/02/2015"
__date__ = "06/02/2015"
__status__ = "production"
__copyright__ = "2007-2009 Risoe National Laboratory; 2010-2015 ESRF"
__licence__ = "GPL"
Expand Down Expand Up @@ -211,9 +211,12 @@ def binary_header(self):

def ascii_header(self, linesep="\n", size=4096):
"""
Generate the ASCII header for writing
@param linesep: end of line separator
@param size: size of the header (without the binary header)
@return string (unicode) containing the mar345 header
@return: string (unicode) containing the mar345 header
"""
try:
version = sys.modules["fabio"].version
Expand Down
28 changes: 14 additions & 14 deletions test/all_testimages.json
Expand Up @@ -16,11 +16,11 @@
"i01f0001.edf.bz2",
"a0009.tif.bz2",
"GE_aSI_detector_image_1529.gz",
"corkcont2_H_0089.mccd",
"Cr8F8140k103.0026.bz2",
"face.msk.bz2",
"b191_1_9_1.img",
"id13_badPadding.edf",
"a0009.edf.bz2",
"b191_1_9_1.img.bz2",
"example.mar2300.gz",
"a0009.tif",
"MultiFrame.edf.bz2",
Expand All @@ -42,35 +42,35 @@
"d80_60s.img.gz",
"oPPA_5grains_0001.tif.gz",
"b191_1_9_1_uncompressed.img.bz2",
"pilatus2M.edf",
"F2K_Seb_Lyso0675.edf",
"somedata_0001.mccd.bz2",
"MultiFrame-Frame0.edf",
"MultiFrame-Frame0.edf.bz2",
"fit2d.tif",
"a0009.tif.gz",
"oPPA_5grains_0001.edf.bz2",
"edfUncompressed_U16.edf.bz2",
"run2_1_00148.cbf",
"mb_LP_1_001.edf",
"face.edf",
"face.msk.gz",
"mb_LP_1_001.img.bz2",
"F2K_Seb_Lyso0675_header_only.edf.bz2",
"F2K_Seb_Lyso0675.edf",
"pilatus2M.edf",
"testmap1_0002.tif",
"testmap1_0002.tif.bz2",
"face.edf.gz",
"F2K_Seb_Lyso0675.edf.gz",
"edfUncompressed_U16.edf.gz",
"edfGzip_U16.edf.bz2",
"i01f0001.edf",
"id13_badPadding.edf.gz",
"edfGzip_U16.edf.gz",
"XSDataImage.xml",
"XSDataImage.edf.gz",
"XSDataImage.xml.gz",
"run2_1_00148.edf",
"Fe3O4_023_101.mar2560.gz",
"fit2d_click.edf.gz",
"Fe3O4_023_101.mar2560.bz2",
"fit2d.tif.gz",
"MultiFrame-Frame0.edf.bz2",
"MultiFrame-Frame0.edf",
"somedata_0001.mccd.gz",
"somedata_0001.mccd",
"run2_1_00148.edf.gz",
Expand All @@ -95,12 +95,12 @@
"d80_60s.edf.gz",
"a0009.edf",
"XSDataImage.edf.bz2",
"edfUncompressed_U16.edf.bz2",
"oPPA_5grains_0001.edf.bz2",
"pilatus2M.edf.bz2",
"fit2d.edf.bz2",
"Cr8F8140k103.0026.gz",
"GE_aSI_detector_image_1529",
"Fe3O4_023_101.mar2560.gz",
"run2_1_00148.edf",
"mgzn-20hpt.img",
"MultiFrame.edf",
"fit2d_click.edf",
Expand All @@ -110,16 +110,16 @@
"MultiFrame-Frame0.edf.gz",
"run2_1_00148.edf.bz2",
"fit2d.tif.bz2",
"Cr8F8140k103.0026.bz2",
"b191_1_9_1.img.bz2",
"corkcont2_H_0089.mccd",
"a0009.edf.bz2",
"pilatus2M.tif.gz",
"i01f0001.edf.gz",
"image0001.pgm.gz",
"fit2d_click.msk.bz2",
"example.mar2300",
"mgzn-20hpt.img.gz",
"MultiFrame.edf.gz",
"id13_badPadding.edf.gz",
"i01f0001.edf",
"i01f0001.kcd.gz",
"XSDataImageInv.xml",
"b191_1_9_1_uncompressed.img",
Expand Down

0 comments on commit 7eca671

Please sign in to comment.