Skip to content

Commit

Permalink
Fix failing tests due to self_shielding attribute
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Havlin <[email protected]>
  • Loading branch information
cphyc and chrishavlin authored Apr 12, 2024
1 parent d96ae86 commit 8612f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt/frontends/ramses/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ class RAMSESDataset(Dataset):
force_cosmological: Optional[bool]
_force_max_level: tuple[int, str]
_bbox: Optional[list[list[float]]]
self_shielding: Optional[bool]
self_shielding: Optional[bool] = None

def __init__(
self,
Expand Down Expand Up @@ -1122,7 +1122,7 @@ def caster(val):
has_namelist = self.read_namelist()

if self.self_shielding is None and has_namelist:
nml = self.ds.parameters["namelist"]
nml = self.parameters["namelist"]

# "self_shielding" is stored in physics_params in older versions of the code
physics_params = nml.get("physics_params", default={})
Expand Down

0 comments on commit 8612f0d

Please sign in to comment.