Temporal

class pyvo.registry.rtcons.Temporal(times)[source]

Bases: pyvo.registry.rtcons.Constraint

A RegTAP constraint on the temporal coverage of resources.

This is a RegTAP 1.2 extension not yet available on all Registries (in 2022). Worse, not too many resources bother declaring this at this point. Until this changes, you will probably have a lot of false negatives (i.e., resources that should match but do not because they are not declaring their time coverage) if you use this constraint.

This constraint accepts astropy Time instances or pairs of Times when specifying intervals. Plain numbers will be interpreted as MJD. RegTAP uses TDB times at the solar system barycenter, and it is probably wise to relax constraints such that such details do not matter. This constraint does not attempt any conversions of time scales or reference positions (which it could not do anyway).

To find resources claiming to have data for Jan 10, 2022:

>>> registry.Temporal(astropy.time.Time('2022-01-10'))

To find resources claiming to have data for some time between MJD 54130 and 54200:

>>> registry.Temporal((54130, 54200))
Parameters
specastropy.Time or a 2-tuple of astropy.Time-s

A point in time or time interval to cover. Plain numbers are interpreted as MJD. All resources overlapping the interval are returned.

Attributes Summary

takes_sequence

Attributes Documentation

takes_sequence = True