-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from sibirrer/main
refactoring LOS classes and split into individual LOS and population
- Loading branch information
Showing
12 changed files
with
183 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
|
||
class LOSIndividual(object): | ||
""" | ||
class to store the quantities of an individual line of sight | ||
""" | ||
def __init__(self, kappa=None, gamma=None): | ||
""" | ||
:param gamma: [gamma1, gamma2] (takes these values if present) | ||
:type gamma: list of floats | ||
:param kappa: convergence (takes this values if present) | ||
:type kappa: float | ||
""" | ||
if kappa is None: | ||
kappa = 0 | ||
if gamma is None: | ||
gamma = [0, 0] | ||
self._kappa = kappa | ||
self._gamma = gamma | ||
|
||
@property | ||
def convergence(self): | ||
""" | ||
line of sight convergence | ||
:return: kappa | ||
""" | ||
return self._kappa | ||
|
||
@property | ||
def shear(self): | ||
""" | ||
line of sight shear | ||
:return: gamma1, gamma2 | ||
""" | ||
return self._gamma[0], self._gamma[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.