API analogs to the illustris_python module (python)
Emma Louise Knudsen
13 Jan '21
Hi,
I want to ask if there is an API analog to the functions embedded in the illustris_python module found on GitHub.
E.g. are there functions like il.sublink.subLinkOffsets() created for when using the API that are available anywhere? The reason is I want to work fully on the API but still use the illustris_python module (e.g. a modified version of it).
A specific example of what I need to do:
Track a subhalo from snapNum e.g. 99 back through time, find mergers above a minimum mass threshhold as well as below a maximum mass threshhold, get the subhalo IDs and the snapshots of the most massive of the two merging galaxies as output. I.e., basically the il.sublink.numMergers() function but with a little more output, and run through API.
I am in the process of modifying the il.sublink.numMergers() function to run on API and give me this specific output, but I am unsure of which of the API links to follow when creating the npIndex (and thus the npID).
I would strongly recommend you sign-up for and use the Lab service for this. It allows you to use an "illustris-python based approach", but still in the web browser and without downloading anything.
If you really want to use the API to accomplish this, I would suggest:
1) Select the subhalo of interest.
2) Download it's main progenitor branch "sublink/mpb.hdf5" using the API call. You can request this either in HDF5 or JSON.
3) Modify the numMergers() function to load a single file thusly downloaded, and determine what you are interested in.
Note that the MPB file you download will have all the information you need, i.e. subhalo IDs, snapshot numbers, and masses to define mass ratios.
Emma Louise Knudsen
14 Jan '21
Hi Dylan,
Thank you very much. I will try using the Lab service!
Best,
Emma
Emma Louise Knudsen
14 Jan '21
Hi Dylan,
When I use the Lab I find that when loading snapshot data, e.g.:
gas = il.snapshot.loadSubhalo(basePath,snapNum=12,partType=0,id=2257228)
Many subhalos does not have the key 'GFM_Metals'. Why is this?
Hi,
I want to ask if there is an API analog to the functions embedded in the illustris_python module found on GitHub.
E.g. are there functions like il.sublink.subLinkOffsets() created for when using the API that are available anywhere? The reason is I want to work fully on the API but still use the illustris_python module (e.g. a modified version of it).
A specific example of what I need to do:
Track a subhalo from snapNum e.g. 99 back through time, find mergers above a minimum mass threshhold as well as below a maximum mass threshhold, get the subhalo IDs and the snapshots of the most massive of the two merging galaxies as output. I.e., basically the il.sublink.numMergers() function but with a little more output, and run through API.
I am in the process of modifying the il.sublink.numMergers() function to run on API and give me this specific output, but I am unsure of which of the API links to follow when creating the npIndex (and thus the npID).
I am aware of the discussion here:
https://www.illustris-project.org/data/forum/topic/87/streamlined-access-to-api-data/
but I have not been able to figure it out based on this..
Best,
Emma
Hi Emma,
I would strongly recommend you sign-up for and use the Lab service for this. It allows you to use an "illustris-python based approach", but still in the web browser and without downloading anything.
If you really want to use the API to accomplish this, I would suggest:
1) Select the subhalo of interest.
2) Download it's main progenitor branch "sublink/mpb.hdf5" using the API call. You can request this either in HDF5 or JSON.
3) Modify the numMergers() function to load a single file thusly downloaded, and determine what you are interested in.
Note that the MPB file you download will have all the information you need, i.e. subhalo IDs, snapshot numbers, and masses to define mass ratios.
Hi Dylan,
Thank you very much. I will try using the Lab service!
Best,
Emma
Hi Dylan,
When I use the Lab I find that when loading snapshot data, e.g.:
gas = il.snapshot.loadSubhalo(basePath,snapNum=12,partType=0,id=2257228)
Many subhalos does not have the key 'GFM_Metals'. Why is this?
Thank you,
Emma
This should be the difference between "full" and "mini" snapshots.
Ahh, I see. Thank you very much!