DjangoplicityImageSource¶
- class toasty.pipeline.djangoplicity.DjangoplicityImageSource[source]¶
Bases:
ImageSource
An ImageSource that obtains its inputs from a query to a Djangoplicity website.
Methods Summary
deserialize
(data)Create an instance of this class by deserializing configuration data.
fetch_candidate
(unique_id, cand_data_stream, ...)Download a candidate image and prepare it for processing.
Get the name of the section key used for this source's configuration data.
make_request
(url[, stream, none404])force_insecure_tls is for noirlab.edu
process
(unique_id, cand_data_stream, ...)Process an input into WWT format.
Generate a sequence of candidate input images that the pipeline may want to process.
Methods Documentation
- classmethod deserialize(data)[source]¶
Create an instance of this class by deserializing configuration data.
- Parameters:
- datadict-like object
A dict-like object containing configuration items deserialized from a format such as JSON or YAML. The particular contents can vary depending on the implementation.
- Returns:
- An instance of cls
- fetch_candidate(unique_id, cand_data_stream, cachedir)[source]¶
Download a candidate image and prepare it for processing.
- Parameters:
- unique_idstr
The unique ID returned by the
toasty.pipeline.CandidateInput
instance that was returned from the initial query.- cand_data_streamreadable stream returning bytes
A data stream returning the data that were saved when the candidate was queried (
toasty.pipeline.CandidateInput.save()
).- cachedirpath-like
A path pointing to a local directory inside of which the full image data and metadata should be cached.
- classmethod get_config_key()[source]¶
Get the name of the section key used for this source’s configuration data.
- Returns:
- A string giving a key name usable in a YAML file.
- process(unique_id, cand_data_stream, cachedir, builder)[source]¶
Process an input into WWT format.
- Parameters:
- unique_idstr
The unique ID returned by the
toasty.pipeline.CandidateInput
instance that was returned from the initial query.- cand_data_streamreadable stream returning bytes
A data stream returning the data that were saved when the candidate was queried (
toasty.pipeline.CandidateInput.save()
).- cachedirpath-like
A path pointing to a local directory inside of which the full image data and metadata should be cached.
- builder
toasty.builder.Builder
State object for constructing the WWT data files.
Notes
Your image processor should run the tile cascade, if needed, but the caller will take care of emitting the
index_rel.wtml
file.
- query_candidates()[source]¶
Generate a sequence of candidate input images that the pipeline may want to process.
- Returns:
- A generator that yields a sequence of
toasty.pipeline.CandidateInput
instances.
- A generator that yields a sequence of