{"id":18750329,"url":"https://github.com/silx-kit/fabio","last_synced_at":"2025-04-08T14:06:29.486Z","repository":{"id":7198963,"uuid":"8503407","full_name":"silx-kit/fabio","owner":"silx-kit","description":"I/O library for images produced by 2D X-ray detector","archived":false,"fork":false,"pushed_at":"2025-03-13T09:35:02.000Z","size":124986,"stargazers_count":59,"open_issues_count":33,"forks_count":53,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-01T12:05:58.455Z","etag":null,"topics":["detector","python","science"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silx-kit.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-01T14:51:50.000Z","updated_at":"2025-03-13T09:35:07.000Z","dependencies_parsed_at":"2024-05-21T13:40:55.936Z","dependency_job_id":"0658aa04-d972-4da0-80ac-cf2ad8402c1d","html_url":"https://github.com/silx-kit/fabio","commit_stats":{"total_commits":2119,"total_committers":59,"mean_commits":35.91525423728814,"dds":0.656441717791411,"last_synced_commit":"9d4e5d86f41fb4452e04285cc00f970c4014e90e"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silx-kit%2Ffabio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silx-kit%2Ffabio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silx-kit%2Ffabio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silx-kit%2Ffabio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silx-kit","download_url":"https://codeload.github.com/silx-kit/fabio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856541,"owners_count":21007620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detector","python","science"],"created_at":"2024-11-07T17:11:25.779Z","updated_at":"2025-04-08T14:06:29.463Z","avatar_url":"https://github.com/silx-kit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FabIO: Fable Input/Output library\n=================================\n\nMain websites:\n\n * https://github.com/silx-kit/fabio\n * http://fable.sf.net (historical)\n\n\n|Build Status| |Appveyor Status|\n\n----\n\nFabIO is an I/O library for images produced by 2D X-ray detectors and written in Python.\nFabIO support images detectors from a dozen of companies (including Mar, Dectris, ADSC, Hamamatsu, Oxford, ...),\nfor a total of 30 different file formats (like CBF, EDF, TIFF, ...) and offers an unified interface to their\nheaders (as a Python dictionary) and datasets (as a numpy ndarray of integers or floats)\n\n\n.. contents::\n    :depth: 1\n\nInstallation\n------------\n\nFabIO is available from `PyPI \u003chttps://pypi.python.org/pypi/fabio\u003e`_:\n\n``pip install fabio``\n\n\n`Debian/Ubuntu packages \u003chttp://www.silx.org/pub/debian/binary/\u003e`_, and\n`wheels \u003chttp://www.silx.org/pub/wheelhouse/\u003e`_ are available\nfor Windows, Linux and MacOSX from the silx repository. \n\nSee the `installation instructions \u003chttp://www.silx.org/doc/fabio/latest/install.html\u003e`_ for more information.\n\nUsage\n-----\n\nOpen an image\n.............\n\n  \u003e\u003e\u003e import fabio\n  \u003e\u003e\u003e obj = fabio.open(\"mydata0000.edf\")\n  \u003e\u003e\u003e obj.data.shape\n  (2048, 2048)\n  \u003e\u003e\u003e obj.header[\"Omega\"]\n  23.5\n  \u003e\u003e\u003e obj.data\n  array([...])\n\nSave an image (ex: EDF)\n.......................\n\n  \u003e\u003e\u003e import fabio\n  \u003e\u003e\u003e obj = fabio.edfimage.EdfImage(data=[...])\n  \u003e\u003e\u003e obj.write(\"mydata0000.edf\")\n\n\nDocumentation\n-------------\n\nSee the `latest release documentation \u003chttp://www.silx.org/doc/fabio/latest/\u003e`_ for further details.\n\nDocumentation of previous versions are available on `silx \u003chttp://www.silx.org/doc/fabio/\u003e`_.\n\nChangelog\n---------\n\nSee http://www.silx.org/doc/fabio/latest/Changelog.html\n\n\nCitation\n--------\n\nThe general philosophy of the library is described in:\n`FabIO: easy access to two-dimensional X-ray detector images in Python; E. B. Knudsen, H. O. Sørensen, J. P. Wright, G. Goret and J. Kieffer Journal of Applied Crystallography, Volume 46, Part 2, pages 537-539. \u003chttp://dx.doi.org/10.1107/S0021889813000150\u003e`_\n\nTransparent handling of compressed files\n----------------------------------------\n\nFor FabIO to handle gzip and bzip2 compressed files transparently, ``bzip`` and ``gzip`` modules must be present when installing/building Python (e.g. ``libbz2-dev`` package for Ubuntu).\n\nBenchmarking details have been collected at http://www.silx.org/doc/fabio/latest/performances.html.\n\n\n\nSupported file formats\n----------------------\n\n* ADSC:\n\n  + AdscImage\n\n* Bruker:\n\n  + BrukerImage\n  + Bruker100Image\n  + KcdImage: Nonius KappaCCD diffractometer\n\n* D3M\n\n  + D3mImage\n\n* Dectris:\n\n  + CbfImage (implements a fast byte offset de/compression scheme in python/cython)\n  + PilatusImage (fileformat derived from Tiff)\n  + EigerImage (derived from HDF5/NeXus format, depends on `h5py`)\n\n* ESRF:\n\n  + EdfImage: The ESRF data Format\n  + XsdImage: XML serialized image from EDNA\n  + Fit2dImage: Fit2d binary format\n  + Fit2dmaskImage: Fit2d Mask format\n  + Fit2dSpreadsheetImage: Fit2d ascii tables (spread-sheet)\n  + LimaImage: image stacks written by the LImA aquisition system\n  + SparseImage: single crystal diffractions images written by pyFAI\n\n* General Electrics \n\n  + GEimage (including support for variant used at APS) \n\n* Hamamatsu\n\n  + HiPiCImage\n\n* HDF5: generic format for stack of images based on h5py\n\n  + Hdf5Image\n  + EigerImage\n  + LimaImage\n  + SparseImage\n\n* JPEG image format:\n  \n  + JPEG using PIL\n  + JPEG 2000 using Glymur \n  \n* Mar Research:\n\n  + MarccdImage (fileformat derived from Tiff)\n  + Mar345Image imaging plate with PCK compression\n\n* MPA multiwire \n\n  +\tMpaImage\n\n* Medical Research Council file format for 3D electron density and 2D images\n\n  + MrcImage\n\n* Nonius -\u003e now owned by Bruker\n  \n  + KcdImage \n\n* Numpy: generic reader for 2D arrays saved\n\n  + NumpyImage \n\n* Oxford Diffraction Sapphire 3\n\n  + OXDimage uncompressed or with TY1 or TY5 compression scheme\n  + Esperanto format (with bitfield compression)\n\n* Pixirad Imaging\n\n  + PixiImage\n   \n* PNM\n\n  + PnmImage\n\n* Princeton Instrument SPE\n\n  + SpeImage\n\n* Raw Binary without compression\n\n* Rigaku\n\n  + RaxisImage\n  + DtrekImage\n  \n* Tiff\n\n  + TifImage using either:\n  \t- Pillow (external dependency)\n  \t- TiffIO taken from PyMca\n\n\n\nDesign Specifications\n---------------------\n\nName: \n.....\n\nFabIO = Fable Input/Output\n\nIdea:\n.....\n\nHave a base class for all our 2D diffraction greyscale images.\nThis consists of a 2D array (numpy ndarray)\nand a python dictionary (actually an ordered dict) of header information in (string key, string value) pairs.\n\nClass FabioImage\n................\n\nNeeds a name which will not to be confused with an RGB color image.\n\nClass attributes, often exposed as properties:\n\n* data   \t\t\t\t\t-\u003e 2D array\n* header \t\t\t\t\t-\u003e ordered dictionary\n* rows, columns, dim1, dim2 -\u003e data.shape (propertiy)\n* header_keys               -\u003e property for list(header.keys()), formerly used to retain the order of the header\n* bytecode                 \t-\u003e data.typecode() (property)\n* m, minval, maxval, stddev\t-\u003e image statistics, could add others, eg roi[slice]\n\nClass methods (functions):\n\n* integrate_area()      -\u003e return sum(self.data) within slice\n* rebin(fact)           -\u003e rebins data, adjusts dims\n* toPIL16()             -\u003e returns a PILimage\n* getheader()           -\u003e returns self.header\n* resetvals()           -\u003e resets the statistics\n* getmean()             -\u003e (computes) returns self.m\n* getmin()              -\u003e (computes) returns self.minval\n* getmax()              -\u003e (computes) returns self.maxval\n* getstddev()           -\u003e (computes) returns self.stddev\n* read()        \t\t-\u003e read image from file [or stream, or shared memory]\n* write()       \t\t-\u003e write image to file  [or stream, or shared memory]\n* readheader()          -\u003e read only the header [much faster for scanning files]\n\nEach individual file format would then inherit all the functionality of this class and just make new read and write methods.\n\nThere are also fileseries related methods (next(), previous(), ...) which returns a FabioImage instance of the next/previous frame in a fileserie\n\nOther feature:\n\n* possibility for using on-the-fly external compression - i.e. if files are\n  stored as something as .gz, .bz2 etc could decompress them, using an external\n  compression mechanism (if available). \n\n\n\n.. |Build Status| image:: https://travis-ci.org/silx-kit/fabio.svg?branch=master\n   :target: https://travis-ci.org/silx-kit/fabio\n.. |Appveyor Status| image:: https://ci.appveyor.com/api/projects/status/4k6lol1vq30qhf66/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/ESRF/fabio/branch/master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilx-kit%2Ffabio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilx-kit%2Ffabio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilx-kit%2Ffabio/lists"}