Investigate direction of I calculation
Closed this issue · 2 comments
As Tiago Pereira said:
stellar atmosphere models are often tabulated on a depth scale, which means that the top of the atmosphere (surface in photospheric models) is the first element in the array. To get the surface intensity, one needs to integrate the radiative transfer equation starting from the deeper layers to the surface, so from the last element to the first element. If you integrate in the opposite direction, then you get the intensity not at the surface, but at the bottom of the atmosphere. That explains why that point can have temperatures around 10^4 K, and also why the spectrum is so much hotter.
Check TODO in star_test
notebook - is Temp in BB (source function) in correct order?
I looked into this and we are definitely calculating it in the correct order. I think my changes in #7 highlight what is going on, so I am going to have that PR close this issue.
EDIT: Also, the short answer to the TODO is that I_nu[55]
is the intensity emitted from the outer surface of the star. We were comparing it to the blackbody from the innermost shell that we considered for seemingly no reason. While the graph does resemble the inner shell blackbodies more than the outer shell, it is really around cells 14-16 that the blackbody resembles the output intensity -- this is because this is where one might consider the photosphere to begin, not all the way at the inner boundary that we consider.
I looked into this and we are definitely calculating it in the correct order. I think my changes in #7 highlight what is going on, so I am going to have that PR close this issue.
Yes @smithis7, we figured direction was right - I should have closed this earlier.
EDIT: Also, the short answer to the TODO is that I_nu[55] is the intensity emitted from the outer surface of the star. We were comparing it to the blackbody from the innermost shell that we considered for seemingly no reason. While the graph does resemble the inner shell blackbodies more than the outer shell, it is really around cells 14-16 that the blackbody resembles the output intensity -- this is because this is where one might consider the photosphere to begin, not all the way at the inner boundary that we consider.
Thanks for explaining. It makes sense.