Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ Load an entire **study**:
dataset.data # access data array
dataset.VisuCoreSize # get a value of a single parameter

Load a parametric file:

.. code-block:: python

from brukerapi.jcampdx import JCAMPDX

parameters = JCAMPDX('path_to_scan/method')

TR = data.params["PVM_RepetitionTime"].value # This way
TR = data.get_value("PVM_RepetitionTime") # Or this way





Expand Down
8 changes: 5 additions & 3 deletions brukerapi/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,11 @@ def _framegroups_to_frames(self, data, layouts):
"""
def ra(self, slice_):
"""
Random access to the data matrix
:param slice_:
:return:
Random access to the data matrix.

:param tuple slice_: Slice object(s) to select data in each dimension.
:return: Selected subset of the data.
:rtype: np.ndarray
"""

layouts, layouts_ra = self._get_ra_layouts(slice_)
Expand Down
62 changes: 0 additions & 62 deletions docs/source/brukerapi.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'brukerapi'
copyright = '2020, Tomas Psorn'
copyright = '2025, Tomas Psorn'
author = 'Tomas Psorn'

# The full version, including alpha/beta/rc tags
release = '0.1.0'
release = '0.1.2'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -55,7 +55,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = []

autodoc_member_order = 'bysource'

Expand Down
8 changes: 8 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Bruker API documentation.
tutorials/how-to-study
tutorials/how-to-2dseq
tutorials/how-to-fid
tutorials/how-to-jcampdx
tutorials/how-to-use-filter
cli

Expand All @@ -25,13 +26,20 @@ Bruker API documentation.

dataset
folders
jcampdx
schemas

.. toctree::
:maxdepth: 2
:caption: Test data:

test_data

.. toctree::
:maxdepth: 2
:caption: Compatibility:

compatibility

Indices and tables
-------------------
Expand Down
7 changes: 0 additions & 7 deletions docs/source/modules.rst

This file was deleted.

23 changes: 23 additions & 0 deletions docs/source/tutorials/how-to-jcampdx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
How to read parametric files
===============================


Simply by importing the JCAMPDX class we can read e.g. the method file.

.. code-block:: python

from brukerapi.jcampdx import JCAMPDX

parameters = JCAMPDX('path_to_scan/method')

TR = data.params["PVM_RepetitionTime"].value # This way
TR = data.get_value("PVM_RepetitionTime") # Or this way


The loaded parameters can be simply cast into dictionary for easier manipulation

.. code-block:: python

parameters_dict = parameters.to_dict()
TR = parameters_dict["PVM_RepetitionTime"]["value"]

Loading