ASCOT5
|
HDF5 Histogram IO. More...
#include <string.h>
#include <stdlib.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "hdf5_histogram.h"
Go to the source code of this file.
Functions | |
int | hdf5_histogram_write_uniform_double (hid_t f, const char *path, int abscissaDim, int ordinateDim, int *abscissaNslots, double *abscissaMin, double *abscissaMax, char **abscissaUnits, char **abscissaNames, char **ordinateUnits, char **ordinateNames, double *ordinate) |
Write a histogram with uniform grid to HDF5 file. | |
HDF5 Histogram IO.
Definition in file hdf5_histogram.c.
int hdf5_histogram_write_uniform_double | ( | hid_t | f, |
const char * | path, | ||
int | abscissaDim, | ||
int | ordinateDim, | ||
int * | abscissaNslots, | ||
double * | abscissaMin, | ||
double * | abscissaMax, | ||
char ** | abscissaUnits, | ||
char ** | abscissaNames, | ||
char ** | ordinateUnits, | ||
char ** | ordinateNames, | ||
double * | ordinate ) |
Write a histogram with uniform grid to HDF5 file.
Histogram can have up to 99 dimensions (abscissae) and likewise the ordinate can be multi-dimensional.
The ordinate is stored as Ndim array where format is ordinateDim x abscissa01Dim x abscissa02Dim ...
The datasets that are written are the ordinate, ordinate dimension, abscissa dimension, abscissa grid vectors (that define edges of each cell), and abscissa grid vector lengths. Abscissae names and units and ordinate names and units are stored as attributes in ordinate and abscissa grid vectors.
The ordinate data is expected to be array with format
f | HDF5 file id |
path | full path including group name where histogram is stored |
abscissaDim | number of abscissa dimensions |
ordinateDim | number of ordinate dimensions |
abscissaNslots | array with abscissa dimensions |
abscissaMin | the lowest abscissa edge for each abscissa dimension |
abscissaMax | the highest abscissa edge for each abscissa dimension |
abscissaUnits | array with abscissa units |
abscissaNames | array with abscissa names |
ordinateUnits | array with ordinate units |
ordinateNames | array with ordinate names |
ordinate | ordinate data |
Definition at line 42 of file hdf5_histogram.c.