Commit 4f5948af authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only apply the h-correction at reading time if the user asked for it.

parent df9ca55b
...@@ -141,7 +141,7 @@ void readArray_chunk(hid_t h_data, hid_t h_plist_id, ...@@ -141,7 +141,7 @@ void readArray_chunk(hid_t h_data, hid_t h_plist_id,
/* Clean-up h if necessary */ /* Clean-up h if necessary */
const float h_factor_exp = units_h_factor(internal_units, props.units); const float h_factor_exp = units_h_factor(internal_units, props.units);
if (h_factor_exp != 0.f && exist != 0) { if (cleanup_h && h_factor_exp != 0.f && exist != 0) {
const double h_factor = pow(h, h_factor_exp); const double h_factor = pow(h, h_factor_exp);
/* message("Multipltying '%s' by h^%f=%f", props.name, h_factor_exp, /* message("Multipltying '%s' by h^%f=%f", props.name, h_factor_exp,
......
...@@ -165,7 +165,7 @@ void readArray(hid_t grp, const struct io_props props, size_t N, ...@@ -165,7 +165,7 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
/* Clean-up h if necessary */ /* Clean-up h if necessary */
const float h_factor_exp = units_h_factor(internal_units, props.units); const float h_factor_exp = units_h_factor(internal_units, props.units);
if (h_factor_exp != 0.f && exist != 0) { if (cleanup_h && h_factor_exp != 0.f && exist != 0) {
const double h_factor = pow(h, h_factor_exp); const double h_factor = pow(h, h_factor_exp);
/* message("Multipltying '%s' by h^%f=%f", props.name, h_factor_exp, /* message("Multipltying '%s' by h^%f=%f", props.name, h_factor_exp,
......
...@@ -143,7 +143,7 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N, ...@@ -143,7 +143,7 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N,
/* Clean-up h if necessary */ /* Clean-up h if necessary */
const float h_factor_exp = units_h_factor(internal_units, prop.units); const float h_factor_exp = units_h_factor(internal_units, prop.units);
if (h_factor_exp != 0.f && exist != 0) { if (cleanup_h && h_factor_exp != 0.f && exist != 0) {
const double h_factor = pow(h, h_factor_exp); const double h_factor = pow(h, h_factor_exp);
/* message("Multipltying '%s' by h^%f=%f", prop.name, h_factor_exp, /* message("Multipltying '%s' by h^%f=%f", prop.name, h_factor_exp,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment