-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement and test updated opacity definition #27
Conversation
) -> bool: | ||
return (data.variances is None) or all( | ||
data.sizes.get(dim) == size for dim, size in sizes.items() | ||
) |
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.
I feel i cannot give feedback to this part without getting explained what exactly its doing. Maybe you could explain it in our next meeting?
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.
Yes, this file was actually just copier from esssans
, so it is has been reviewed by someone previously.
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.
Yes it all makes sense and fits to the equation of opacity!
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.
Sorry for the late review, I thought this was all good and finalized.
|
||
def intensity(wavelength: sc.Variable, opacity0: sc.Variable) -> sc.Variable: | ||
opacity = OpacityFunction(opacity0) | ||
return transmission_empty_glass * sc.exp(-opacity(wavelength)) |
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.
It seems here that transmission_empty_glass
is assumed to be a constant? (unless I misread).
However, in the documentation notebook it says that it could be wavelength dependent. Do we need to factor that in now, or are we leaving it for a later stage?
If the latter, should we include a TODO?
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.
As far as I remember, it was said "it is in principle not constant, but no one ever measured that". As it would complicate #24, I would like to keep this as it is, until we have clear evidence that this is not sufficient.
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.
Yes that was exactly the status, so I agree on keeping it as it is!
return He3Opacity[Cell](0.07733 * pressure * cell_length * wavelength) | ||
from scipp.constants import Boltzmann as k_B | ||
|
||
he3_neutron_absorption_cross_section_at_1_angstrom = 2966.0e-24 * sc.Unit( |
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.
Can we add a reference to an article or database where the 2966.0e-24
came from?
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.
We are already tracking this in #28. In particular, I think this should have error bars.
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.
ok
This should replace #20 and #21. This is based on my understanding looking at the docs added in #26.
@astellhorn Please check if this is correct.
Can you answer the TODO about the units?