Formatter¶
-
class
lsst.daf.butler.Formatter¶ Bases:
objectInterface for reading and writing Datasets with a particular
StorageClass.Methods Summary
name()Returns the fully qualified name of the formatter. predictPath(location)Return the path that would be returned by write, without actually writing. read(fileDescriptor[, component])Read a Dataset. write(inMemoryDataset, fileDescriptor)Write a Dataset. Methods Documentation
-
classmethod
name()¶ Returns the fully qualified name of the formatter.
-
predictPath(location)¶ Return the path that would be returned by write, without actually writing.
- location :
Location - The location to simulate writing to.
- location :
-
read(fileDescriptor, component=None)¶ Read a Dataset.
Parameters: - fileDescriptor :
FileDescriptor Identifies the file to read, type to read it into and parameters to be used for reading.
- component :
str, optional Component to read from the file. Only used if the
StorageClassfor reading differed from theStorageClassused to write the file.
Returns: - inMemoryDataset :
InMemoryDataset The requested Dataset.
- fileDescriptor :
-
write(inMemoryDataset, fileDescriptor)¶ Write a Dataset.
Parameters: - inMemoryDataset :
InMemoryDataset The Dataset to store.
- fileDescriptor :
FileDescriptor Identifies the file to write.
Returns: - path :
str The path to where the Dataset was stored.
- inMemoryDataset :
-
classmethod