CutoutPath#
- class lsst.analysis.ap.CutoutPath(root, chunk_size=None, subdirectory='images')#
Bases:
objectManage paths to image cutouts with filenames based on diaSourceId.
Supports local files, and id-chunked directories.
Parameters#
- root
str Root file path to manage.
- chunk_size
int, optional At most this many files per directory. Must be a power of 10.
- subdirectory
str, optional Name of the subdirectory
Raises#
- RuntimeError
Raised if chunk_size is not a power of 10.
Methods Summary
__call__(id, filename)Return the full path to a diaSource cutout.
directory(id)Return the directory to store the output in.
exists(id, filename)Return True if the file already exists.
mkdir(id)Make the directory tree to write this cutout id to.
Methods Documentation
- __call__(id, filename)#
Return the full path to a diaSource cutout.
Parameters#
- id
int Source id to create the path for.
- filename:
str Filename to write.
Returns#
- path
str Full path to the requested file.
- id
- directory(id)#
Return the directory to store the output in.
Parameters#
- id
int Source id to create the path for.
Returns#
- directory:
str Directory for this file.
- id
- root