ASCOT5
Loading...
Searching...
No Matches
Functions
hdf5_histogram.h File Reference

Header file for hdf5_histogram.c. More...

#include <hdf5.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.
 

Detailed Description

Header file for hdf5_histogram.c.

Definition in file hdf5_histogram.h.

Function Documentation

◆ hdf5_histogram_write_uniform_double()

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

Parameters
fHDF5 file id
pathfull path including group name where histogram is stored
abscissaDimnumber of abscissa dimensions
ordinateDimnumber of ordinate dimensions
abscissaNslotsarray with abscissa dimensions
abscissaMinthe lowest abscissa edge for each abscissa dimension
abscissaMaxthe highest abscissa edge for each abscissa dimension
abscissaUnitsarray with abscissa units
abscissaNamesarray with abscissa names
ordinateUnitsarray with ordinate units
ordinateNamesarray with ordinate names
ordinateordinate data
Returns
zero on success

Definition at line 42 of file hdf5_histogram.c.