-
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
139 prepare for magnetism refl1d #140
Conversation
sample = _build_sample(self.storage, model_name) | ||
probe = _get_probe( | ||
q_array=np.linspace(0.001, 0.3, 10), | ||
dq_array=np.linspace(0.001, 0.3, 10), # TODO why would we use a steadily increasing dq (resolution)? |
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.
Where do these numbers come 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.
Generally speaking, the numbers are a sensible range o be calculating reflectivity over. I am less sure about the linspace though as logspace is used in alot of real experiments. Though it doesn't really matter so much
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.
Realized that the provided q and dq are not used for anything in the SLD determination. However, they are required and are now changed to 1 as a dummy value and a code comment has been added.
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.
minor comments about coding style
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.
A few comments, some of which are almost certainly due to my inability to understand refl1d's code documentation - so apologies for those ones
sample = _build_sample(self.storage, model_name) | ||
probe = _get_probe( | ||
q_array=np.linspace(0.001, 0.3, 10), | ||
dq_array=np.linspace(0.001, 0.3, 10), # TODO why would we use a steadily increasing dq (resolution)? |
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.
Generally speaking, the numbers are a sensible range o be calculating reflectivity over. I am less sure about the linspace though as logspace is used in alot of real experiments. Though it doesn't really matter so much
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.
My only comment is about the equality checking, which you can do with as you like
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.
happy with code changes so approving.
Move functionality used more than 1 time to private functions:
_get_probe
_get_polarized_probe
_get_oversampling
_get_sample
Made it possible to do a POC calculations with magnetism by setting
MAGNETISM=True
Renamed constants to make it more clear what they represents.
Introduced new polarized probe that is needed for calculations with magnetism. The results obtained from the "ordinary" probe and the polarized probe are not identical. No work have been done yet to understand these differences.
Removed functionality that is no longer used:
'resolution': 'dq'
anddq
in refnxupdate_item
in refld