Skip to content

Always calculate histogram edges; fixes #21

Ethan Nelson requested to merge histo-bugfix into master

See #21 (closed) for information on the basic background. When specifying a variable's histogram using (start, stop, step) in the gridding program, the edges parameter is not included in the metadata. This causes problems when the aggregate code wants to read in the steps for a histogram. Note this behavior only appears when 1) specifying that a variable should be histogramed, 2) you only specify the start, stop and step instead of the edges, and 3) you run the aggregator code on the gridded files.

This MR solves the problem by 1) saving bin edges to the local settings dictionary after calculating them in the gridding code and 2) recalculating edges in the aggregate code.

Just (1) does not solve the problem because the metadata written out to the gridded files is actually the YAML file contents that were read in as opposed to a dump of the settings dictionary.

Edited by Paolo Veglio

Merge request reports

Loading