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

TODO: More reading convenience methods #2

Open
ericaddison opened this issue Dec 1, 2016 · 1 comment
Open

TODO: More reading convenience methods #2

ericaddison opened this issue Dec 1, 2016 · 1 comment
Labels

Comments

@ericaddison
Copy link
Owner

Add convenience methods to jsdataset for reading that use frame values instead of logical frame index. I would like to the following APIs:

readTrace( traceTuple )         # return 1D numpy array 
readFrame( frameTuple )      # return 2D numpy array 
readVolume( volumeTuple ) # return 3D numpy array 
readHyper( hyperValue )       # return 4D numpy array 

Where the *tuple is a tuple describing the framework location of the requested data. For example, if I wanted to extract frame 1001 from volume 200 in hypercube 3, I would call

frame = data.readFrame( (3,200,1001) ) 

Or, if the dataset is only 4D (no hyper dimension), I would call

frame = data.readFrame( (200,1001) ) 

Also pluralized versions that accept lists in the tuples would be helpful, i.e.

# read frames 1000-2000 in hyper 3, volume 200
frame = data.readFrames( (3,200,[1000,2000]) )   # or something like that!
@ericaddison
Copy link
Owner Author

Working for the readFrame() method, which just required implementing the readFrame(int* position...) methods in jsFileReader.

Have not done so for readTrace() yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant