ImageCollection¶
- class toasty.collection.ImageCollection[source]¶
Bases:
ABC
Methods Summary
Generate a sequence of
toasty.image.ImageDescription
items associated with this collection.Export information about the paths in this collection, if possible.
images
()Generate a sequence of
toasty.image.Image
items associated with this collection.Methods Documentation
- descriptions()[source]¶
Generate a sequence of
toasty.image.ImageDescription
items associated with this collection.Each description will have an added string attribute
collection_id
that gives a unique textual identifer for the item in the collection.Unlike
ImageCollection.images()
, this function does cause the full data for each image to be loaded.
- export_simple()[source]¶
Export information about the paths in this collection, if possible.
- Returns:
- A list of tuples
(fits_file_path, hdu_index)
.
- A list of tuples
- Raises:
- Raises an exception if it is not possible to meaningfully export this
- particular collection in the “simple” format. This could be the case,
- for instance, if the inputs live in memory and do not have filesystem
- paths.
Notes
Sometimes, you need to expose information about a FITS collection to a tool outside of Toasty: for instance, to invoke
hipsgen
to generate a HiPS tiling. This function gives the information needed to invoke the tool, or raises an error if it can’t be done correctly. This method makes it possible to handle image collections using Toasty’s framework, but “drop down” to a simpler representation when needed.
- images()[source]¶
Generate a sequence of
toasty.image.Image
items associated with this collection.Each image will have an added string attribute
collection_id
that gives a unique textual identifer for the item in the collection.