Coder Social home page Coder Social logo

Comments (1)

tovrstra avatar tovrstra commented on June 15, 2024

I'd suggest introducing a cube attribute in the IOData class, which will replace the current cube_data and ugrid. This cube would be an instance of the following type:

class Cube(NamedTuple):
    origin: np.ndarray
    axes: np.ndarray
    shape: np.ndarray
    data: np.ndarray  # replaces cube_data

This is the relevant part of the current docstring for the old attributes, which I'll adapt for the docstring of the Cube class:

    cube_data
        A (K, L, M) array of data on a uniform grid (defined by ugrid).

...

    ugrid
        A dictionary describing the uniform grid (typically from a cube file).
        It contains the following fields: ``origin``, a 3D vector with the
        origin of the axes frame. ``axes`` a 3x3 array where each row represents
        the spacing between two neighboring grid points along the first, second
        and third axis, respectively. ``shape`` A three-tuple with the number of
        points along each axis, respectively.

The old approach stems from certain data structures in HORTON2, which we do not have anymore in IOData, so there is no need to use exactly the same structure. (All relevant parts are still present.) The new approach is a little simpler and lighter and still works for Cube, CHGCAR and POTCAR files.

@PaulWAyers @FarnazH If you have any suggestions or comments, please let me know.

from iodata.

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.