Illustris Web API: search_query syntax

Ignacio G. de la Rosa
  • 22 Apr '16

In the API Cookbook you show (e.g. Task 2) an example of a search_query string with boolean expression: [search_query = "?massgt=" + str(mass_min) + "&masslt=" + str(mass_max)]. My question is: which is the syntax used to construct these queries? For instance, which is the syntax one should use to query by the Barro et al. (2013) compactness criterion:
search_query = "?(mass_stars1e10/0.704)/(halfmassrad_stars/((z+1)0.704))^1.5gt=" + str(barro13) + "&mass_starsgt=" + str(mass_min) NOTE that this "search_query" does not work... it is just a reference for the kind of operations needed. Many thanks in advance Ignacio

Dylan Nelson
  • 22 Apr '16

Hi Ignacio,

This is described at the API documentation under "Search and cutout requests".

But, this will not cover such a "diagonal" search that you were after. Best option, is to simply download the group catalog (for the redshift and simulation you want), then e.g.

gc = il.groupcat.loadSubhalos(basePath, snapNum, fields=['SubhaloMassType','SubhaloHalfmassRadType'])

mass_stars = gc['SubhaloMassType'][:,4] * 1e10 / little_h # Msun
rad_stars = gc['SubhaloHalfmassRadType'][:,4] / (1+z) / little_h # pkpc

w = np.where( (mass_stars/rad_stars**1.5 > barro13) & (mass_stars > mass_min) )

Or, if you really want to do this on the web API, you could (i) pick a small bin of stellar mass, (ii) calculate the restriction on halfmassrad_stars as a single scalar number appropriate for that bin and redshift, (iii) do a search of e.g. &halfmassrad_stars__gt=value&mass_stars__gt=minmass&mass_stars__lte=maxmass. You could do this in a loop over mass bins and combine the result.

Dylan Nelson
  • 22 Apr '16

Also you might want to look at Wellons+ (2015), probably you have seen already, Sec 3.1 describes a Barro selection on Illustris and some details of relevance.

Ignacio G. de la Rosa
  • 22 Apr '16

Thanks a lot, Dylan. That's what I needed. Very efficient service!

  • Page 1 of 1