ImageDiscoverer¶
- class pyvo.discover.image.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
Methods Summary
fills the X_recs attributes with resources declaring coverage for our constraints.
queries the discovered image services according to our constraints.
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¶
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.
- query_services()[source]¶
queries the discovered image services according to our constraints.
This creates fills the results and the log attributes.
- 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.