Uploaded image for project: 'SAFe Program'
  1. SAFe Program
  2. SP-3910

Enhance python client following astroquery module rules

Change Owns to Parent OfsSet start and due date...
    XporterXMLWordPrintable

Details

    • Feature
    • Must have
    • PI21
    • None
    • SRCnet
    • Hide

      BH1: Once this module is created, the python library will be documented for scientist and easily usable by them into notebooks

      BH2: Once this module is stable and using an operational environment, the module could be registered so it will be disseminated to all the scientific community after the astropy update at their client side

      Show
      BH1: Once this module is created, the python library will be documented for scientist and easily usable by them into notebooks BH2: Once this module is stable and using an operational environment, the module could be registered so it will be disseminated to all the scientific community after the astropy update at their client side
    • Hide

      AC1: Provision of the python library and description of how to import it into a notebook system

      AC2: Initial sphynx pages with the description of the signature of the library and how to use it

      Show
      AC1: Provision of the python library and description of how to import it into a notebook system AC2: Initial sphynx pages with the description of the signature of the library and how to use it
    • Inter Program
    • 1
    • 1
    • 0
    • Team_MAGENTA
    • Sprint 4
    • Show
      Code: https://gitlab.com/ska-telescope/src/src-service-apis/ska-src-astroquery   Demo: https://confluence.skatelescope.org/display/SRCSC/2024-02-01+SRC+ART+System+Demo+21.4+Part+2+PM   Docs (AC2): https://ska-src-astroquery-ska-telescope-src-src-service-e0beaa892f0bf5.gitlab.io/srcnet/srcnet.html  
    • 21.6
    • Stories Completed, Demonstrated, Satisfies Acceptance Criteria, Accepted by FO
    • PI24 - UNCOVERED

    • 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()

       

       

       

      Attachments

        Issue Links

          Structure

            Activity

              People

                Jesus.Salgado Salgado, Jesus
                Jesus.Salgado Salgado, Jesus
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Feature Progress

                  Story Point Burn-up: (100.00%)

                  Feature Estimate: 1.0

                  IssuesStory Points
                  To Do00.0
                  In Progress   00.0
                  Complete69.0
                  Total69.0

                  Dates

                    Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel