nb2. Query a catalogue


In this notebook three functions are presented which query a (moderately long) list of sources from a catalogue:

For lists with a very large number of sources, run one query per block of 100 sources. See Example 2b and Example 2d.


The relevant columns in the ALMA Archive datasets are



Query list of coordinates



Query list of resolved names



Query list of ALMA source names



Example 2a: Query a catalogue of high-z quasars

First we import a catalogue of high redshift quasars from VizieR, using astroquery:

Note: VizieR limits the number of catalogue entries to 50 per default. We will now use the RA and Dec coordinates in the catalogue to do the search in the ALMA archive.

We now query the ALMA archive:

We can now plot the distribution of ALMA observed quasars from the chosen catalogue.

Please run several queries in case the number of sources in your list is very large.


Example 2b: Query a large catalogue with many sources

Not more than 100 sources should be submitted in a single query. For large catalogues, several queries should be submitted consecutively. Explicitly telling VizieR that no limit shall be placed on the results to return, we obtain:

We will now use the RA and Dec coordinates in the catalogue to do the search in the ALMA archive in chunks of 100 results. These results are then combined back into a single pandas table.

We can now plot the distribution of ALMA observed quasars from the chosen catalogue.


Example 2c: Query a list of sources using a name resolver

The function query_resolved_source_name_list will query Sesame for each source name and then query the ALMA TAP service with the returned coordinates. If a source is not known by Sesame (like the 'unknownsourcename' we have put in explicitly), then the function writes out a warning.


Example 2d: Query a long list of sources using a name resolver

We query a lisf of many sources in groups of 100 sources at a time and combine the result into a single pandas dataframe.


Example 2e: Query a list of sources using the ALMA source name

Although in most cases the coordinate query or the source name resolving queries should be preferred, there may be occasions where it is useful to query directly for the source name as given by the PI.


Example 2f: Query a long list of sources using the ALMA source

We query a lisf of many sources in groups of 100 sources at a time and combine the result into a single pandas dataframe.