Skip to content

Commit

Permalink
fix repr of LayerLimit and MagneticLayerLimit in flayer.py
Browse files Browse the repository at this point in the history
There was a reference to self._tag in the function, but that attribute was never defined
  • Loading branch information
bmaranville committed Oct 10, 2024
1 parent 48c3587 commit b2c71e8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions refl1d/flayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ def __init__(self, flayer, isend=True, isrho=True):
self.flayer = flayer
self.isend = isend
self.isrho = isrho
self.name = str(flayer) + (".rho_" if isrho else ".irho_") + ("end" if isend else "start")
self.name = str(flayer) + self._tag

@property
def _tag(self):
return (".rho_" if self.isrho else ".irho_") + ("end" if self.isend else "start")

def parameters(self):
return []
Expand All @@ -281,7 +285,11 @@ def __init__(self, flayer, isend=True, isrhoM=True):
self.flayer = flayer
self.isend = isend
self.isrhoM = isrhoM
self.name = str(flayer) + (".rhoM_" if isrhoM else ".thetaM_") + ("end" if isend else "start")
self.name = str(flayer) + self._tag

@property
def _tag(self):
return (".rhoM_" if self.isrhoM else ".thetaM_") + ("end" if self.isend else "start")

def parameters(self):
return []
Expand Down

0 comments on commit b2c71e8

Please sign in to comment.