LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter Class Reference
Inheritance diagram for lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter:

Public Member Functions

 read (self, component=None)
 
 write (self, inMemoryDataset)
 

Public Attributes

 extension
 

Static Public Attributes

 unsupportedParameters = frozenset()
 
 supportedExtensions = frozenset({".hsp", ".fit", ".fits"})
 
str extension = '.hsp'
 

Detailed Description

Interface for reading and writing healsparse.HealSparseMap files.

Definition at line 47 of file healSparseMapping.py.

Member Function Documentation

◆ read()

lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.read ( self,
component = None )

Definition at line 53 of file healSparseMapping.py.

53 def read(self, component=None):
54 # Docstring inherited from Formatter.read.
55 path = self.fileDescriptor.location.path
56
57 if component == 'coverage':
58 try:
59 data = hsp.HealSparseCoverage.read(path)
60 except (OSError, RuntimeError):
61 raise ValueError(f"Unable to read healsparse map with URI {self.fileDescriptor.location.uri}")
62
63 return data
64
65 if self.fileDescriptor.parameters is None:
66 pixels = None
67 degrade_nside = None
68 else:
69 pixels = self.fileDescriptor.parameters.get('pixels', None)
70 degrade_nside = self.fileDescriptor.parameters.get('degrade_nside', None)
71 try:
72 data = hsp.HealSparseMap.read(path, pixels=pixels, degrade_nside=degrade_nside)
73 except (OSError, RuntimeError):
74 raise ValueError(f"Unable to read healsparse map with URI {self.fileDescriptor.location.uri}")
75
76 return data
77
std::shared_ptr< table::io::Persistable > read(table::io::InputArchive const &archive, table::io::CatalogVector const &catalogs) const override

◆ write()

lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.write ( self,
inMemoryDataset )

Definition at line 78 of file healSparseMapping.py.

78 def write(self, inMemoryDataset):
79 # Docstring inherited from Formatter.write.
80 # Update the location with the formatter-preferred file extension
81 self.fileDescriptor.location.updateExtension(self.extension)
82 inMemoryDataset.write(self.fileDescriptor.location.path, clobber=True)
83
84

Member Data Documentation

◆ extension [1/2]

str lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.extension = '.hsp'
static

Definition at line 51 of file healSparseMapping.py.

◆ extension [2/2]

lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.extension

Definition at line 81 of file healSparseMapping.py.

◆ supportedExtensions

lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.supportedExtensions = frozenset({".hsp", ".fit", ".fits"})
static

Definition at line 50 of file healSparseMapping.py.

◆ unsupportedParameters

lsst.pipe.tasks.healSparseMapping.HealSparseMapFormatter.unsupportedParameters = frozenset()
static

Definition at line 49 of file healSparseMapping.py.


The documentation for this class was generated from the following file: