-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Density docs #918
Density docs #918
Changes from 9 commits
69d8f73
203351b
5f13ad3
b9a658a
c04ba6e
9fd0671
fab030f
ed0448b
824fa9a
746b206
63ca77e
732cbbf
8dce502
894a17b
d552c3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,20 +220,23 @@ def no_of_raw_shells(self): | |
def v_boundary_inner(self): | ||
if self._v_boundary_inner is None: | ||
return self.raw_velocity[0] | ||
if self._v_boundary_inner < 0: | ||
return self.raw_velocity[0] | ||
return self._v_boundary_inner | ||
|
||
@v_boundary_inner.setter | ||
def v_boundary_inner(self, value): | ||
if value is not None: | ||
value = u.Quantity(value, self.v_boundary_inner.unit) | ||
if value > self.v_boundary_outer: | ||
raise ValueError('v_boundary_inner must not be higher than ' | ||
'v_boundary_outer.') | ||
if value > self.raw_velocity[-1]: | ||
raise ValueError('v_boundary_inner is outside of ' | ||
'the model range.') | ||
if value <= self.raw_velocity[0]: | ||
value = None | ||
if value > 0: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again |
||
value = u.Quantity(value, self.v_boundary_inner.unit) | ||
if value > self.v_boundary_outer: | ||
raise ValueError('v_boundary_inner must not be higher than ' | ||
'v_boundary_outer.') | ||
if value > self.raw_velocity[-1]: | ||
raise ValueError('v_boundary_inner is outside of ' | ||
'the model range.') | ||
if value < self.raw_velocity[0]: | ||
raise ValueError('v_boundary_inner is outside of the model range.') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is lower than the lowest shell in the model |
||
self._v_boundary_inner = value | ||
# Invalidate the cached cut-down velocity array | ||
self._velocity = None | ||
|
@@ -242,20 +245,23 @@ def v_boundary_inner(self, value): | |
def v_boundary_outer(self): | ||
if self._v_boundary_outer is None: | ||
return self.raw_velocity[-1] | ||
if self._v_boundary_outer < 0: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again |
||
return self.raw_velocity[-1] | ||
return self._v_boundary_outer | ||
|
||
@v_boundary_outer.setter | ||
def v_boundary_outer(self, value): | ||
if value is not None: | ||
value = u.Quantity(value, self.v_boundary_outer.unit) | ||
if value < self.v_boundary_inner: | ||
raise ValueError('v_boundary_outer must not be smaller than ' | ||
'v_boundary_inner.') | ||
if value < self.raw_velocity[0]: | ||
raise ValueError('v_boundary_outer is outside of ' | ||
'the model range.') | ||
if value >= self.raw_velocity[-1]: | ||
value = None | ||
if value > 0: | ||
value = u.Quantity(value, self.v_boundary_outer.unit) | ||
if value < self.v_boundary_inner: | ||
raise ValueError('v_boundary_outer must not be smaller than ' | ||
'v_boundary_inner.') | ||
if value < self.raw_velocity[0]: | ||
raise ValueError('v_boundary_outer is outside of ' | ||
'the model range.') | ||
if value > self.raw_velocity[-1]: | ||
raise ValueError('v_boundary_outer is outside of the model range.') | ||
self._v_boundary_outer = value | ||
# Invalidate the cached cut-down velocity array | ||
self._velocity = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you want to specify
0 * u.km/u.s