rsfbpic/rsdata/read_field_hdf.py
def read_time(path_to_file, n_dump_str):
    """
    Read simulation time from an HDF5 file.

    Assume openPMD conventions
    Assume 2D mesh of values (ie quasi-3D rz)
    Args:
        path_to_file: location of a specific HDF5 file
        n_dump_str:   dump number (as a string)
    Returns:
        time: time [s] at which data was dumped
   """
    file = h5py.File(path_to_file,'r')
    data = file.get('data/')
    step = data.get(n_dump_str)
    time = step.attrs["time"] * step.attrs["timeUnitSI"]

    return time

    Read simulation time from an HDF5 file.

    Assume openPMD conventions
    Assume 2D mesh of values (ie quasi-3D rz)
    Args:
        path_to_file: location of a specific HDF5 file
        n_dump_str:   dump number (as a string)
    Returns:
        time: time [s] at which data was dumped
   
Read simulation time from an HDF5 file.
Assume openPMD conventions
Assume 2D mesh of values
Read simulation time from an HDF5 file . Assume openPMD conventions Assume 2D mesh of values
def read_time(path_to_file, n_dump_str):
    file = h5py.File(path_to_file,'r')
    data = file.get('data/')
    step = data.get(n_dump_str)
    time = step.attrs["time"] * step.attrs["timeUnitSI"]
    return time
def read_time ( path_to_file , n_dump_str ) : file = h5py . File ( path_to_file , 'r' ) data = file . get ( 'data/' ) step = data . get ( n_dump_str ) time = step . attrs [ "time" ] * step . attrs [ "timeUnitSI" ] return time
Read simulation time from an HDF5 file.
Read simulation time from an HDF5 file .
"""
    Read simulation time from an HDF5 file.

    Assume openPMD conventions
    Assume 2D mesh of values (ie quasi-3D rz)
    Args:
        path_to_file: location of a specific HDF5 file
        n_dump_str:   dump number (as a string)
    Returns:
        time: time [s] at which data was dumped
   """
time [s] at which data was dumped
time [ s ] at which data was dumped
time
path_to_file
location of a specific HDF5 file
location of a specific HDF5 file
n_dump_str
dump number (as a string)
dump number ( as a string )