Load subsets using API

Xingyao Cai
  • 5 Nov '22

HI Dylan:

The simulation I use: TNG50-1, Snapshot: 99.

Initially, many thanks to your team for your contribution, which make it possible to explore almost everything i m interested in.

I am currently analyzing the distribution of HI throughout the simulation box. My questions are as follows.

  • I am using the function [loadSubset()] to acquire the HI data in the cells via the online JupyterLab, is this correct?

  • I am used to coding in my VSCode, so I would like to know if I can implement the function [loadSubset()] (or the correct function) via Python request and API-key?

Thanks for answering my questions :D

Xingyao

Xingyao Cai
  • 2
  • 5 Nov '22

And i found that i cant use the online JupyterLab. It worked well yesterday.
My chrome returns as follows:


Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /lab/hub/login.

Reason: Error reading from remote server


Thanks again for your help!
Xingyao


Edit again:
It preforms well now!

Dylan Nelson
  • 5 Nov '22

Yes you can use loadSubset() to load PartType0/NeutralHydrogenAbundance which is described in the documentation. Note this is not exactly the atomic hydrogen mass.

I would suggest the Lab online.

Or you can use your local VSCode, and either download data i.e. snapshots and then use loadSubset(). Or, you can use the API to make requests and download pieces of data, in which case you would just open them directly with h5py.

  • Page 1 of 1