nb1. Query one source


In this notebook we query one source in three modes:


The relevant columns in the ALMA Science Archive TAP service are


First we need to set up the python modules


By coordinate


The most basic search of a source is based on its coordinates. To do this we use the INTERSECT function to find all observations where the footprint (s_region) overlaps with the search circle.


By coordinate: Display and sort by distance


It is also possible to add a column to the ADQL output. For example we can now display the distance of the positions in the archive catalogue to the searched coordinate and sort by it.


By the resolved source name


Astropy comes with functionality to resolve astronomical source names into coordinates using the Sesame service of CDS. This can be combined with the coordinate query above.


By the ALMA source name


These two functions encapsulate the search for a source name as given by the PI in the proposal to ALMA (for a search using a name-resolver, see above):


Example 1a: Find sources at coordinate RA: 201.365, DEC: -43.019

The same query but now adding the distance column:


Example 1b: Query the source Centaurus A using Sesame

Many sources have a number of names and you can not be sure that the source name the PI placed into the ALMA proposal is the source name you have in mind. We use the name-resolver Sesame provided by CDS to first resolve the source name into coordinates and then search around those coordinates.


Example 1c: Query the ALMA source name "Centaurus"

Although in most cases, using the name resolver as above is the best way to search for source names, there can be occasions where searching for the name as given by the PI is useful. (Note that SQL queries are case-sensitive).


Example 1d: Query the source name "Centaurus"

Since source names in the ALMA proposals might be spelled differently it can be useful to search for parts of the name.