Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError for self.bkg_maps in BkgMakerBase #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/pybkgmodel/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ def get_maps(self):
"""

self.generate_runwise_maps()
self.write_maps(bkg_maps=self.bkg_maps, overwrite=self.overwrite)
return self.bkg_maps
self.write_maps(bkg_maps=self._bkg_maps, overwrite=self.overwrite)
return self._bkg_maps

class Stacked(BkgMakerBase):
"""
Expand All @@ -380,19 +380,17 @@ def get_maps(self):
"""

self.generate_runwise_maps()
stacked_map = self.stack_maps(self.bkg_maps,
self.x_edges,
self.y_edges,
self.e_edges
)
stacked_map = self.stack_maps(
self._bkg_maps, self.x_edges, self.y_edges, self.e_edges
)

stacked_name = os.path.join(
self.out_dir,
f"{self.out_prefix}stacked_bkg_map.fits"
)
self.bkg_maps = {stacked_name: stacked_map}
self.write_maps(bkg_maps=self.bkg_maps, overwrite=self.overwrite)
return self.bkg_maps
self._bkg_maps = {stacked_name: stacked_map}
self.write_maps(bkg_maps=self._bkg_maps, overwrite=self.overwrite)
return self._bkg_maps

class RunwiseWobbleMap(Runwise):
"""
Expand Down
Loading