Builder

class toasty.builder.Builder(pio)[source]

Bases: object

State for some kind of imagery data set that’s being assembled.

Attributes Summary

imgset

The WWT ImageSet data describing the image data and their positioning on the sky.

pio

A PyramidIO object representing the backing storage of the tiles and other image data.

place

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.

default_tiled_study_astrometry()

execute_study_tiling(image, tiling, **kwargs)

Tile the specified image as a WWT "study".

load_from_wwtl(cli_settings, wwtl_path[, ...])

make_placeholder_thumbnail()

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

apply_avm_info(avm, width, height)[source]
apply_wcs_info(wcs, width, height)[source]
cascade(**kwargs)[source]
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.

default_tiled_study_astrometry()[source]
execute_study_tiling(image, tiling, **kwargs)[source]

Tile the specified image as a WWT “study”.

Parameters:
imagetoasty.image.Image

The image that will be tiled

tilingtoasty.study.StudyTiling

The prepared tiling information

**kwargs

Arguments relayed to toasty.study.StudyTiling.tile_image(), such as cli_progress.

Returns:
self
load_from_wwtl(cli_settings, wwtl_path, cli_progress=False)[source]
make_placeholder_thumbnail()[source]
make_thumbnail_from_other(thumbnail_image)[source]
prepare_study_tiling(image)[source]

Set up to tile the specified image as a WWT “study”.

Parameters:
imagetoasty.image.Image

The image that will be tiled

Returns:
tilingtoasty.study.StudyTiling

The prepared tiling information

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 use execute_study_tiling() to actually perform the tiling process.

set_name(name)[source]
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() and execute_study_tiling(), applying the WCS metadata in between, so that WCS errors can be caught and reported before doing the I/O.

toast_base(sampler, depth, is_planet=False, is_pano=False, **kwargs)[source]
write_index_rel_wtml(add_place_for_toast=False)[source]