pyVisOS is designed to be simple to use and easy to understand. The primary goal is to provide an in-memory representation of the HDF5 output generated by PIC code OSIRIS. It also provides some functions to automate MPI parallelism.
H5Data is a subclass of numpy ndarray with following additional attributes:
- name and timestamp: inferred from the filename. These two also serve as default output filename.
- run_attrs: a dictionary inferred from the root directory of the HDF5 output. It provides information about the simulation.
- data_attrs: a dictionary inferred from the dataset directory. It provides information about the quantity. One quantity for each dataset for the grid type output.
- axes: a list inferred from the /AXIS directory. It provides information about the axes. It is always consistent with the data array.
A common workflow for data analysis would look like this:
- load a few quantities into memory
- distribute the workload across MPI processes
- data analysis
- (optionally) gather results from each MPI process and some more analysis (but without redistributing the workload)
Step 3 and 4 are the actual work we should be focusing on and pyVisOS provides a wrapper to automate step 1 and 2 (and partially, step 4).
independent_timeframe_pptm: can be used if the analysis can be done in a way that data at different timestamps are independent. see pynting_flux_example.py for details.
The codes are tested under python 3.5
Pip install the dev branch of this repo directly from github
pip install git+https://github.com/UCLA-Plasma-Simulation-Group/pyVisOS.git@dev
Once installed, import any pyVisOS module in python in the normal way:
import osh5vis
import osh5io
...