CollectionLoader¶
- class toasty.collection.CollectionLoader[source]¶
Bases:
object
A class defining how to load a collection of images.
This is implemented as its own class since there can be some options involved, and we want to provide a centralized place for handling them all.
For interactive usage, use
load()
, which is optimized for easy invocation. This class is best used in command-line interfaces that interact with collections of FITS files.Attributes Summary
Methods Summary
add_arguments
(parser)Add standard collection-loading options to an argparse parser object.
create_from_args
(settings)Process standard collection-loading options to create a
CollectionLoader
.load_paths
(paths)Set up an
ImageCollection
based on a list of input filesystem paths.Attributes Documentation
- blankval = None¶
- hdu_index = None¶
Methods Documentation
- classmethod add_arguments(parser)[source]¶
Add standard collection-loading options to an argparse parser object.
- Parameters:
- parser
argparse.ArgumentParser
The argument parser to modify
- parser
- Returns:
- The
CollectionLoader
class (for chainability).
- The
Notes
If you are writing a command-line interface that takes an image collection as an input, use this function to wire in to standardized image-loading infrastructure and options.
- classmethod create_from_args(settings)[source]¶
Process standard collection-loading options to create a
CollectionLoader
.- Parameters:
- settings
argparse.Namespace
Settings from processing command-line arguments
- settings
- Returns:
- A new
CollectionLoader
initialized with the settings.
- A new
- load_paths(paths)[source]¶
Set up an
ImageCollection
based on a list of input filesystem paths.- Parameters:
- pathsiterable of str
The filesystem paths to load.
- Returns:
- A new
ImageCollection
.
- A new