ImageDiscoverer

class pyvo.discover.ImageDiscoverer(*, space=None, spectrum=None, time=None, inclusive=False, watcher=None, timeout=20)[source]

Bases: object

A management class for VO global image discovery.

This encapsulates all of constraints, service lists, results, and diagnostics. This probably should not be considered API but rather as an implementation detail of discover_images.

The normal usage is do call discover_services(), which will locate all VO services that may have relevant data. Alternatively, call set_services(registry_results) with some result of a registry.search() call. ImageDiscoverer will then pick capabilities it can use out of the resource records. Records without usable capabilities are silently ignored.

Then call query_services to execute the discovery query on these services.

See images_globally for a discussion of its constructor parameters.

Attributes Summary

center

radius

spectrum

time_max

time_min

Methods Summary

discover_services()

fills the X_recs attributes with resources declaring coverage for our constraints.

get_query_stats()

returns a tuple of n(total to query), n(already queried)

query_services()

queries the discovered image services according to our constraints.

reset_services()

clears the queues of services to query.

set_services(registry_results[, purge_redundant])

as an alternative to discover_services, this sets the services to be queried to the result of a custom registry query.

Attributes Documentation

center = None
radius = None
spectrum = None
time_max = None
time_min = None

Methods Documentation

discover_services()[source]

fills the X_recs attributes with resources declaring coverage for our constraints.

X at this point is sia1, sia2, and obscore.

It tries to filter out as many duplicates (i.e., services operating on the same data collections) as it can. The order of preference is Obscore, SIA2, SIA.

get_query_stats()[source]

returns a tuple of n(total to query), n(already queried)

query_services()[source]

queries the discovered image services according to our constraints.

This creates and fills the results and the log_messages attributes.

reset_services()[source]

clears the queues of services to query.

This is the only supported way to interrupt operations once query_services has been called.

This will not interrupt the query currently running. There is currently no way to do that.

set_services(registry_results: RegistryResults, purge_redundant: bool = True) None[source]

as an alternative to discover_services, this sets the services to be queried to the result of a custom registry query.

This will pick the “most capabable” interface from each record and ignore records without image discovery capabilities.

If you set purge_redundant to false, this will not attempt to eliminate services that are alternative interfaces to services that are already called. There are very few situations in which you would want to do that, mostly related to debugging.