Skip to content

Commit

Permalink
Update docs, rm lazy arg in kikuchipyheader2dicts, prep v0.2.2 rel (#190
Browse files Browse the repository at this point in the history
)

Signed-off-by: Håkon Wiik Ånes <[email protected]>
  • Loading branch information
hakonanes authored May 24, 2020
1 parent 9114e1a commit 1a1c484
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
7 changes: 5 additions & 2 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.

Contributors to each release are listed in alphabetical order.

Unreleased
==========
0.2.2 (2020-05-24)
==================

This is a patch release that fixes reading of EBSD data sets from h5ebsd files
with arbitrary scan group names.

Contributors
------------
Expand Down
6 changes: 3 additions & 3 deletions doc/load_save_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ passed. The ``scan_group_names`` parameter is unnecessary if only ``Scan 1`` is
to be read since reading the first scan in the file is the default behaviour.

So far, only :ref:`saving patterns <save-patterns>` to kikuchipy's own h5ebsd
format is supported. It is possible to write a new scan with a new scan number
to an existing, but closed, h5ebsd file in the kikuchipy format, e.g. one
containing only ``Scan 1``, by passing:
format is supported. It is possible to write a new scan with a scan name
``Scan x``, where ``x`` is a number, to an existing, but closed, h5ebsd file in
the kikuchipy format, e.g. one containing only ``Scan 1``, by passing:

.. code-block::
Expand Down
16 changes: 7 additions & 9 deletions kikuchipy/io/plugins/h5ebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def file_reader(
until required. Allows opening arbitrary sized datasets. Default
is False.
kwargs
Key word arguments passed to h5py.File.
Key word arguments passed to :obj:`h5py:File`.
Returns
-------
Expand Down Expand Up @@ -166,7 +166,7 @@ def get_scan_groups(file: h5py.File) -> List[h5py.Group]:
Parameters
----------
file : h5py:file
file : h5py:File
File where manufacturer, version and scan datasets should reside
in the top group.
Expand Down Expand Up @@ -228,7 +228,7 @@ def get_desired_scan_groups(
Parameters
----------
file: h5py:File
file : h5py:File
File where manufacturer, version and scan datasets should
reside in the top group.
scan_group_names
Expand Down Expand Up @@ -485,7 +485,7 @@ def h5ebsdheader2dicts(
elif "bruker" in manufacturer.lower():
md, omd, scan_size = brukerheader2dicts(scan_group, md)
else: # kikuchipy
md, omd, scan_size = kikuchipyheader2dicts(scan_group, md, lazy)
md, omd, scan_size = kikuchipyheader2dicts(scan_group, md)

ebsd_node = metadata_nodes("ebsd")
md.set_item(ebsd_node + ".manufacturer", manufacturer)
Expand All @@ -495,7 +495,7 @@ def h5ebsdheader2dicts(


def kikuchipyheader2dicts(
scan_group: h5py.Group, md: DictionaryTreeBrowser, lazy: bool = False
scan_group: h5py.Group, md: DictionaryTreeBrowser
) -> Tuple[DictionaryTreeBrowser, DictionaryTreeBrowser, DictionaryTreeBrowser]:
"""Return scan metadata dictionaries from a kikuchipy h5ebsd file.
Expand All @@ -505,8 +505,6 @@ def kikuchipyheader2dicts(
HDF group of scan data and header.
md
Dictionary with empty fields from kikuchipy's metadata.
lazy
Read dataset lazily.
Returns
-------
Expand Down Expand Up @@ -758,7 +756,7 @@ def file_writer(
scan_number
Scan number in name of HDF dataset when writing to an existing,
but not open, h5ebsd file.
**kwargs :
kwargs
Keyword arguments passed to :meth:`h5py:Group.require_dataset`.
"""
# Set manufacturer and version to use in file
Expand Down Expand Up @@ -877,7 +875,7 @@ def dict2h5ebsdgroup(dictionary: dict, group: h5py.Group, **kwargs):
``Metadata``, with keys as dataset names.
group : h5py:Group
HDF group to write dictionary to.
**kwargs :
kwargs
Keyword arguments passed to :meth:`h5py:Group.require_dataset`.
"""
for key, val in dictionary.items():
Expand Down
2 changes: 1 addition & 1 deletion kikuchipy/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
name = "kikuchipy"
platforms = ["Linux", "MacOS X", "Windows"]
status = "Development"
version = "0.2.1"
version = "0.2.2"

0 comments on commit 1a1c484

Please sign in to comment.