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

Density docs #918

Merged
merged 15 commits into from
May 2, 2019
Merged

Density docs #918

merged 15 commits into from
May 2, 2019

Conversation

marxwillia
Copy link
Contributor

Added warnings and updated documentation relating to Issue #908. Warnings alert the user when the boundary velocities specified in the config file are ignored. Explanation of this behavior is added to the custom density documentation.

@codecov-io
Copy link

Codecov Report

Merging #918 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
+ Coverage   66.41%   66.42%   +0.01%     
==========================================
  Files          84       84              
  Lines        5991     5993       +2     
==========================================
+ Hits         3979     3981       +2     
  Misses       2012     2012
Impacted Files Coverage Δ
tardis/model/base.py 89.72% <100%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32bcf38...5f13ad3. Read the comment docs.

Inner Boundary
==============

The first velocity-density pair in a custom density file (given by index 0) specifies the velocity of the inner boundary approximation to the photosphere. The density associated with this velocity is the density of the optically thick inner region, which does not affect TARDIS spectra. Therefore, the first density (5.4869692e-10 in the example above) can be replaced by a placeholder value. The user can choose to both specify a custom density fileAND specify v_inner_boundary and v_outer_boundary in the configuration YAML file for a TARDIS run. In this case, v_inner_boundary is ignored if it is less than the smallest velocity listed in the custom density file. Likewise, v_outer_boundary is ignored if it is larger than the largest velocity in the custom density file. If either of the YAML specified boundary velocities fall within the velocity range specified in the custom density file, then the boundary velocity is set equal to the number in the configuration YAML file. This has the effect of splitting a cell in the custom density file into two parts, a region within the boundary and a region outside the boundary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take out optically thick maybe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifies to v=0 (which is r=0). If specifying a v_inner below the inner boundary of the model - it will make a new shell with the given density.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've decided not to implement this functionality. The user must change their model if they want to specify a v_inner_boundary lower than the lowest shell velocity, and similarly for v_outer_boundary.

@@ -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:
Copy link
Member

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

'the model range.')
if value <= self.raw_velocity[0]:
value = None
if value > 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again 0 * u.km / u.s

@@ -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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again 0 * u.km/u.s

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.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is lower than the lowest shell in the model

@wkerzendorf
Copy link
Member

Looks very good - what happened to the notebook?

distance: 8.32 Mpc

# standard atomic data base; get it from the tardis-refdata repository
atom_data: /home/mew488/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now you can just write kurucz_cd23_chianti_H_He.h5

@wkerzendorf wkerzendorf merged commit 549adee into tardis-sn:master May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants