Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt GridInterfaces to support Histogram and QuadMesh data #547

Closed
3 tasks done
philippjfr opened this issue Mar 8, 2016 · 5 comments
Closed
3 tasks done

Adapt GridInterfaces to support Histogram and QuadMesh data #547

philippjfr opened this issue Mar 8, 2016 · 5 comments

Comments

@philippjfr
Copy link
Member

philippjfr commented Mar 8, 2016

We have long struggled to find an appropriate format to store Histogram and QuadMesh data, which store the edges of the bins in 2D and 3D. The dense data interface provides an opportunity to adapt these types to use a general interface. The major component of this work will be to generalize the GridColumns proposal to work with bin edges as well as discrete coordinates.

The steps to get this implemented should roughly follow:

  • Adapt GridColumns interface to work with bin edges as key dimension values.
  • Change Histogram and QuadMesh to use the data interface.
  • Change plotting code to use the interface to access the data.
@philippjfr
Copy link
Member Author

After some discussion centered around making sure the design makes sense for different data backends, e.g. xarray and iris, we have come to the conclusion that we will also need an API to access the bin edges of key dimensions. The dimension_values method would always return the bin centers, while the new method would either compute a best guess for the edges (if only bin centers have been supplied) or just return the stored bin edges. GridColumns would still have to support supplying the data in both formats.

@jlstevens
Copy link
Contributor

The dimension_values method would always return the bin centers, while the new method would either compute a best guess for the edges...

This is useful in some cases but I might want this method only at the interface level and not at the element level, simply because we use dimension_values all the time but haven't needed edges till now. That way we don't need to add yet another method to elements but make the functionality available for when it is needed.

Alternatively, how about offering a utility to do this? The guessing process sounds like something very general that doesn't depend on the details of the element? If there are stored bin edges, that data should just be accessed directly without using such a guessing utility.

GridColumns would still have to support supplying the data in both formats.

I believe this would be called GridInterface now. :-)

Couldn't GridInterface just make use of such a utility to support different formats (center/edge) in the element constructors?

@philippjfr philippjfr modified the milestones: v1.6.0, v1.5.0 Apr 20, 2016
@philippjfr philippjfr changed the title Adapt GridColumns interface to support Histogram and QuadMesh data Adapt GridInterfaces to support Histogram and QuadMesh data Oct 25, 2016
@philippjfr
Copy link
Member Author

Definitely not happening as part of 1.7, will postpone until 1.8.

@philippjfr
Copy link
Member Author

Finally done! We're so close to converting all elements.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants