Git Product home page Git Product logo

Comments (1)

fergu avatar fergu commented on June 11, 2024

For a bit of context on what dimension scales do for anyone unfamiliar, in order to help the discussion (this blurb is written by me, not from HDF5 docs or anything, so take it with a grain of salt and all that)

HDF5 Dimension Scales are basically just a way to attach coordinate information to a given axis of a dataset. If I am given a new HDF5 file that someone else made, and I want to know the coordinate information associated with an axis of a dataset, I can just query the dimension scale associated with that axis, and it will give me a dataset with the corresponding coordinate information. This is much smoother than trying to infer what other dataset in the file is meant to be the coordinate data for that axis based on names or context or an email from the creator of the file. This additionally allows multiple datasets to share a single dimension scale, with all of those datasets pointing to a single piece of data in the file (as opposed to copies of identical data scattered around the file). In other words, these are another tool in helping make HDF5 files "self-describing".

Practically, dimension scales are just regular HDF5 Datasets with some extra attributes added to track where they are being used. You can write an HDF5 dataset to file, and then use the HDF5 library function h5ds_set_scale() to specify that the dataset is a scale. This adds a few attributes to the new scale to indicate things like the "name" of the scale (which is different than the path of the scale), and a list of datasets that a given scale is attached to. The handy thing about that last point is that attaching a scale to a dataset (using h5ds_attach_scale()) also adds a link to the scale as an attribute of the target dataset. You can read that attribute/link, and it will return an HDF5.Dataset (well, currently an hid_t, but that's what this task aims to fix) directly, without having to find a name/parse a path or anything like that.

from hdf5.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.