Builder¶
- class toasty.builder.Builder(pio)[source]¶
Bases:
object
State for some kind of imagery data set that’s being assembled.
Attributes Summary
The WWT ImageSet data describing the image data and their positioning on the sky.
A PyramidIO object representing the backing storage of the tiles and other image data.
The WWT Place data describing a default view of the image data.
Methods Summary
apply_avm_info
(avm, width, height)apply_wcs_info
(wcs, width, height)cascade
(**kwargs)create_wtml_folder
([add_place_for_toast])Create a one-item
wwt_data_formats.folder.Folder
object capturing this image.execute_study_tiling
(image, tiling, **kwargs)Tile the specified image as a WWT "study".
load_from_wwtl
(cli_settings, wwtl_path[, ...])make_thumbnail_from_other
(thumbnail_image)prepare_study_tiling
(image)Set up to tile the specified image as a WWT "study".
set_name
(name)tile_base_as_study
(image, **kwargs)Tile an image assuming that it is in the appropriate format for WWT's "study" framework, namely that it uses a tangential (gnomonic) projection on the sky.
toast_base
(sampler, depth[, is_planet, is_pano])write_index_rel_wtml
([add_place_for_toast])Attributes Documentation
- imgset = None¶
The WWT ImageSet data describing the image data and their positioning on the sky.
Data URLs in this ImageSet should be populated as relative URLs.
- pio = None¶
A PyramidIO object representing the backing storage of the tiles and other image data.
- place = None¶
The WWT Place data describing a default view of the image data.
Methods Documentation
- create_wtml_folder(add_place_for_toast=False)[source]¶
Create a one-item
wwt_data_formats.folder.Folder
object capturing this image.- Parameters:
- add_place_for_toastoptional boolean, defaults to False
All-sky/all-planet datasets usually don’t want to be associated with a particular Place. Otherwise, loading up the imageset causes the view to zoom to a particular RA/Dec or lat/lon, likely 0,0.
- execute_study_tiling(image, tiling, **kwargs)[source]¶
Tile the specified image as a WWT “study”.
- Parameters:
- image
toasty.image.Image
The image that will be tiled
- tiling
toasty.study.StudyTiling
The prepared tiling information
- **kwargs
Arguments relayed to
toasty.study.StudyTiling.tile_image()
, such ascli_progress
.
- image
- Returns:
- self
- prepare_study_tiling(image)[source]¶
Set up to tile the specified image as a WWT “study”.
- Parameters:
- image
toasty.image.Image
The image that will be tiled
- image
- Returns:
- tiling
toasty.study.StudyTiling
The prepared tiling information
- tiling
Notes
After calling this method, you should set up the WCS for the tiled imagery, using
default_tiled_study_astrometry()
as a backstop if no real information is available. Then useexecute_study_tiling()
to actually perform the tiling process.
- tile_base_as_study(image, **kwargs)[source]¶
Tile an image assuming that it is in the appropriate format for WWT’s “study” framework, namely that it uses a tangential (gnomonic) projection on the sky.
Use of this method is somewhat discouraged since it both analyzes and performs the tiling all at once, which means that you can only correctly set (and validate) the WCS information after doing all the work of tiling. (Which in turn is because the proper way to apply WCS information to an imageset depends on the tiling parameters.) It is generally better to use
prepare_study_tiling()
andexecute_study_tiling()
, applying the WCS metadata in between, so that WCS errors can be caught and reported before doing the I/O.