Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging a New File #1525

Open
ax3l opened this issue Aug 31, 2023 · 5 comments
Open

Debugging a New File #1525

ax3l opened this issue Aug 31, 2023 · 5 comments

Comments

@ax3l
Copy link
Member

ax3l commented Aug 31, 2023

Debugging a new file output with @tsung1029 right now.

passes the validator but not yet openpmd-ls / the reference API reader. It seems it tries to open the group w/o the 0-prefixes.

ez_00000005.h5.tar.gz

We are continuing tomorrow with a new file :)

  • updating iterationFormat for file name
  • updating standard version to 1.1.0
@ax3l ax3l self-assigned this Aug 31, 2023
@ax3l ax3l changed the title Debuggin New FIle Debugging a New FIle Aug 31, 2023
@ax3l
Copy link
Member Author

ax3l commented Aug 31, 2023

ez_00000005.zip

@ax3l ax3l changed the title Debugging a New FIle Debugging a New File Sep 1, 2023
@ax3l
Copy link
Member Author

ax3l commented Sep 1, 2023

ez_00000005.zip

@ax3l
Copy link
Member Author

ax3l commented Sep 1, 2023

The last file can be opened and read 🎉

In openPMD-viewer, this has still some issues with the GUI cc @RemiLehe due to not-recognized axisLabels.

               ATTRIBUTE "axisLabels" {
                  DATATYPE  H5T_STRING {
                     STRSIZE 100;
                     STRPAD H5T_STR_SPACEPAD;
                     CSET H5T_CSET_ASCII;
                     CTYPE H5T_C_S1;
                  }
                  DATASPACE  SIMPLE { ( 3 ) / ( 3 ) }
                  DATA {
                  (0): "r                                                                                                   ",
                  (1): "\xi                                                                                                 ",
                  (2): "                                                                                                    "
                  }
               }

leading to a ts.slider() exception of

StopIteration                             Traceback (most recent call last)
File ~/micromamba/envs/warpx-openmp-dev/lib/python3.11/site-packages/ipywidgets/widgets/widget_selection.py:133, in findvalue(array, value, compare)
    132 try:
--> 133     return next(x for x in array if compare(x, value))
    134 except StopIteration:

StopIteration: 

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
File ~/micromamba/envs/warpx-openmp-dev/lib/python3.11/site-packages/ipywidgets/widgets/widget_selection.py:242, in _Selection._validate_value(self, proposal)
    241 try:
--> 242     return findvalue(self._options_values, value, self.equals) if value is not None else None
    243 except ValueError:

File ~/micromamba/envs/warpx-openmp-dev/lib/python3.11/site-packages/ipywidgets/widgets/widget_selection.py:135, in findvalue(array, value, compare)
    134 except StopIteration:
--> 135     raise ValueError('%r not in array'%value)

ValueError: 'y' not in array

@ax3l
Copy link
Member Author

ax3l commented Sep 1, 2023

import h5py

f = h5py.File("ez_00000005.h5")

f["/data/5/fields/ez"]
# <HDF5 dataset "ez": shape (512, 512), type "<f8">

list(f["/data/5/fields/ez"].attrs)
['LONG_NAME',
 'UNITS',
 'axisLabels',
 'dataOrder',
 'geometry',
 'geometryParameters',
 'gridGlobalOffset',
 'gridSpacing',
 'gridUnitSI',
 'position',
 'time',
 'timeOffset',
 'unitDimension',
 'unitSI']

f["/data/5/fields/ez"].attrs["geometry"]
# b'cartesian'

# this will be fixed next to have two arguments only
f["/data/5/fields/ez"].attrs["axisLabels"]
# array([b'r', b'\\xi', b''], dtype='|S100')

@ax3l
Copy link
Member Author

ax3l commented Sep 5, 2023

New file: readable, openPMD-viewer plotting in time series not yet showing a plot, but recognizing the field already:
ez_00000005.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant