Details
-
Feature
-
Must have
-
None
-
SRCnet
-
-
-
Inter Program
-
1
-
1
-
0
-
Team_MAGENTA
-
Sprint 4
-
-
-
-
21.6
-
Stories Completed, Demonstrated, Satisfies Acceptance Criteria, Accepted by FO
-
-
PI21-PB
Description
Currently, there is a prototype client to access the metadata management and data management APIs.
astroquery (https://astroquery.readthedocs.io/en/latest/) is a submodule inside astropy that allows the connection to services from different astronomical missions and observatories.
It looks natural to have a specific astroquery module for the srcnet (astroquery.srcnet). Whenever the services are considered prepared to be operational and accessing real data, modules are registered by contacting the main maintainer (Brigitta Sipocz in this case)
The astroquery module has the python code and help pages written in sphinx.
The rules to create code for astroquery are described at https://github.com/astropy/astroquery/blob/main/CONTRIBUTING.rst
and the implementations should try to follow the astroquery API
https://github.com/astropy/astroquery/blob/main/docs/api.rst
There are many examples of other missions that could be used as a starting point and, also, a template to create the classes properly.
To start, a basic module able to discover data, invoke the ObsCore TAP server, and discover and invoke the data accesses provided in the data link would be a good step forward.
Usually, these modules could invoke other astropy modules in the implementation of the methods (e.g pyvo). Science users usually have astropy imported so whenever they update the library they get into their environments the methods to access the data from all the projects.
During the development phase, the prototype library can be distributed directly to the users before being properly integrated in astropy and the sphinx pages contain self-consistent snippets that can be copy/pasted into notebooks so users can start to use them very easily.
Possible signature of basic methods that could be used are:
> from astroquery.ska import SRCNET
the equivalent to the astroquery traditional login to configure the SRCNET object S = Service(user='username',password='password') (not applicable to our case)
> SRCNET.setToken(<token>);
> table = SRCNET.query_tap(query=(<adql_query>))
or, specifically,
> table = SRCNET.query_object(<target_name>)
(where, internally, target name is resolved using simbad package, the equivalent ADQL is created and the query_tap query is invoked)
to download some files to create an environment, for example
> SRCNET.get_data(<identifier list>)
or to create an environment downloading all the files of one table to the local node
> table.get_data()