summaryrefslogtreecommitdiffstats
path: root/docs/source/io.rst
blob: 9ac78a4086010d69cc3908a9b00c2baea8284e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Read/ write AcquisitionData and ImageData
*****************************************


NeXus
=====

The CCPi Framework provides classes to read and write :code:`AcquisitionData` and :code:`ImageData`
as NeXuS files.

.. code:: python

  # imports
  from ccpi.io import NEXUSDataWriter, NEXUSDataReader

  # initialise NEXUS Writer
  writer = NEXUSDataWriter()
  writer.set_up(file_name='tmp_nexus.nxs',
              data_container=my_data)
  # write data
  writer.write_file()

  # read data
  # initialize NEXUS reader
  reader = NEXUSDataReader()
  reader.set_up(nexus_file='tmp_nexus.nxs')
  # load data
  ad1 = reader.load_data()
  # get AcquisiionGeometry
  ag1 = reader.get_geometry()

.. autoclass:: ccpi.io.NEXUSDataReader
   :members:
   :special-members:
.. autoclass:: ccpi.io.NEXUSDataWriter
   :members:
   :special-members:
|

Nikon
=====
.. autoclass:: ccpi.io.NikonDataReader
   :members:
   :special-members:
|


:ref:`Return Home <mastertoc>`