Giter Site home page Giter Site logo

Code chunk meta/coords about nsrdb HOT 5 CLOSED

grantbuster avatar grantbuster commented on August 18, 2024
Code chunk meta/coords

from nsrdb.

Comments (5)

grantbuster avatar grantbuster commented on August 18, 2024 1

yes but I think actually you just need to add chunks['meta'] = meta_chunks based on the docstring for "chunks" in this method:

chunks : dict
Dictionary of chunk tuples corresponding to each dataset.

I didn't remember that we sub-class the reV outputs handler for the nsrdb applications. You may not need to modify any reV code, just make any changes in the class linked above.

from nsrdb.

MRossol avatar MRossol commented on August 18, 2024

code from WTK:

from rex.rechunk_h5.chunk_size import ArrayChunkSize
chunks = ArrayChunkSize.compute(self.meta)

from nsrdb.

grantbuster avatar grantbuster commented on August 18, 2024

So that method that michael reference will get the correct chunk shapes for any array. I think we want this to happen wherever the coordinate dataset gets written in the reV outputs hander and then here for the nsrdb meta data:

def _init_output_h5(self, f_out, dsets, time_index, meta, force=False):

from nsrdb.

bnb32 avatar bnb32 commented on August 18, 2024

so compute chunks for coords/meta and then write them out in chunked form like meta = meta.create_dataset("chunked", (1000, 1000), chunks=chunks)?

from nsrdb.

bnb32 avatar bnb32 commented on August 18, 2024

added chunks for meta here

meta_chunks = ArrayChunkSize.compute(meta.to_numpy())
chunks['meta'] = meta_chunks
and for coordinates here
if add_coords:
coords = meta[['latitude', 'longitude']].to_numpy()
coords_chunks = ArrayChunkSize.compute(coords)
chunks['coords'] = coords_chunks

from nsrdb.

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.