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

Kernel keep dying while using getCutout #34

Open
ehsankharazmi opened this issue Jul 18, 2021 · 1 comment
Open

Kernel keep dying while using getCutout #34

ehsankharazmi opened this issue Jul 18, 2021 · 1 comment

Comments

@ehsankharazmi
Copy link

Hi,

I was trying to retrieve the Channel velocity data by using getCutout method and it keeps killing the python kernel. We tested with default api getCutout as well and it does the same. I think this is related to issue#30 and I will appreciate your help. A simple MWE is given as follows;

velocity = lJHTDB.getCutout(
    data_set = 'channel',
    field='u',
    time_step=tidx,
    start = np.array([x0, y0, z0]),
    end  = np.array(cut_dims),
    step  = np.array([1, 1, 1]),
    filter_width = 1)  

I will appreciate your quick response.

Thanks!
EK

@shervinsahba
Copy link

I'm still getting familiar with the dataset, but the error may be from JHTDB's switch to 1-indexing from 0-indexing in the space and time coordinates. If you think that's the case with your query, try something like

import numpy as np
import pyJHTDB

lJHTDB = pyJHTDB.libJHTDB()
lJHTDB.initialize()
auth_token = "<your auth token>"   #<--- AUTH
lJHTDB.add_token(auth_token)

result = lJHTDB.getbigCutout(
        data_set='isotropic1024coarse', fields='u', 
        t_start=1, t_end=3, t_step=1,
        start=np.array([1, 1, 1], dtype = int),
        end=np.array([1024, 1024, 1], dtype = int),
        step=np.array([16, 16, 1], dtype = int),
        filter_width=4,
        filename='cutout')

lJHTDB.finalize()

If you change t_start or one of the spatial starts to 0, it will fail with error

"System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: JHTDB started using 1-based indexing from Sept 16. Please update your JHTDB library if you have not done so.

If you're using Jupyter, the error may not print but it should be in the console.

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

No branches or pull requests

2 participants