LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
Loading...
Searching...
No Matches
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)
 

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 48 of file healSparseMapping.py.

Member Function Documentation

◆ read()

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

Definition at line 54 of file healSparseMapping.py.

54 def read(self, component=None):
55 # Docstring inherited from Formatter.read.
56 path = self.fileDescriptor.location.path
57
58 if component == 'coverage':
59 try:
60 data = hsp.HealSparseCoverage.read(path)
61 except (OSError, RuntimeError):
62 raise ValueError(f"Unable to read healsparse map with URI {self.fileDescriptor.location.uri}")
63
64 return data
65
66 if self.fileDescriptor.parameters is None:
67 pixels = None
68 degrade_nside = None
69 else:
70 pixels = self.fileDescriptor.parameters.get('pixels', None)
71 degrade_nside = self.fileDescriptor.parameters.get('degrade_nside', None)
72 try:
73 data = hsp.HealSparseMap.read(path, pixels=pixels, degrade_nside=degrade_nside)
74 except (OSError, RuntimeError):
75 raise ValueError(f"Unable to read healsparse map with URI {self.fileDescriptor.location.uri}")
76
77 return data
78
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 79 of file healSparseMapping.py.

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

Member Data Documentation

◆ extension

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

Definition at line 52 of file healSparseMapping.py.

◆ supportedExtensions

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

Definition at line 51 of file healSparseMapping.py.

◆ unsupportedParameters

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

Definition at line 50 of file healSparseMapping.py.


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