nenupy.observation.tapdatabase
Observation Database
The amount of NenuFAR observations is rising, since the start of the commissioning period up to now, the early science phase period. This results in a huge quantity of available observations, with many different array configurations, which could be used for scientific or commissioning purposes. However, with the increase of recorded observations, the difficulty to find one particular observation that suits specific needs is becoming more and more tricky.
Each NenuFAR observation is associated with the production of
a Beamlet Statistics FITS file (or BST,
see also BST_Data
)
containing the beamformed low-rate data from the LaNewBa
receiver, aiming at:
commissioning;
providing a quick-look of the observation;
providing the observation context/metadata in their header.
These BST observations are recorded in the Nançay database as a TAP service, an IVOA standard which can be queried using the ADQL (Astronomical Data Query Language ADQL ) language.
The class ObsDatabase
is designed to ease such queries. It uses the TAP access
capabilities of PyVO
to search and return NenuFAR BST observation queries as
Table
instances. A limited number of
parameters can be filled to prepare the queries yet, however,
the class is flexible enough to eventually accepts more
parameters. Those are:
time_range
: Query NenuFAR observations made within a time period.freq_range
: Query NenuFAR observations made within a frequency range.fov_radius
: Angular radius used to search for observations around specific sky coordinates.fov_center
: Center (in sky coordinates) of the search for NenuFAR observation targetting coordinates withinfov_radius
.
The logger may help following building up of the query.
>>> from nenupy.observation import ObsDatabase
>>> import logging
>>> logging.getLogger('nenupy').setLevel(logging.INFO)
>>> db = ObsDatabase()
2020-04-01 12:00:00 -- INFO: TAP service http://vogate.obs-nancay.fr/tap accessed.
>>> db.query
'SELECT target_name, obs_creator_did, s_ra, s_dec, t_min, t_max, em_min, em_max from nenufar.bst WHERE ()'
>>> db.meta_names = ['obs_title']
>>> db.query
'SELECT obs_title from nenufar.bst WHERE ()'
>>> db.time_range = ['2019-04-01 12:00:00', '2019-04-02 12:00:00']
2020-04-01 12:00:00 -- INFO: time_range set to [<Time object: scale='utc' format='iso' value=2019-04-01 12:00:00.000>, <Time object: scale='utc' format='iso' value=2019-04-02 12:00:00.000>].
>>> db.query
'SELECT obs_title from nenufar.bst WHERE ((t_min >= 58574.5 AND t_max <= 58575.5))'
>>> observations = db.search()
2020-04-01 12:00:00 -- INFO: TAP service columns to return: ['obs_title'].
>>> len(observations)
5
- class nenupy.observation.tapdatabase.ObsDatabase[source]
Bases:
object
Class to access NenuFAR BST TAP service.
- property fov_center
Center of the field of view queried, in comination with the radius
fov_radius
.- Setter:
Center of the field of view.
- Getter:
Center of the field of view.
- Type:
Warning
Must be set after
fov_radius
.
- property fov_radius
Radius of the query, in combination with the query center
fov_center
.- Setter:
Radius (in degrees if no unit is provided). Default is
180 deg
.- Getter:
Radius in degrees.
- Type:
Warning
Must be set before
fov_center
.
- property freq_range
Frequency range selection for the ADQL query using
search()
. Default is[None, None]
which means that no condition based on observation frequencies will be applied.
- property meta_names
Column names (observation properties) to return using
search()
.- Setter:
list
of column names.- Getter:
Properties to query.
- Type:
- Seealso:
- property query
Full query, combining returned parameteres
meta_names
and the conditionsconditions
.- Getter:
Query.
- Type:
- search()[source]
Run the TAP
query
on the NenuFAR BST service.- Returns:
NenuFAR observation properties resulting from the ADQL query.
- Return type: