-
Notifications
You must be signed in to change notification settings - Fork 7
Add new generator: PowerTermGenerator #53
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
base: master
Are you sure you want to change the base?
Conversation
9881c74 to
0ce417b
Compare
|
Can you rebase and add to the documentation (create |
| sign is determined by start, stop, focus and exponent parameters | ||
| """ | ||
|
|
||
| def __init__(self, axis, units, start, stop, focus, exponent, divisor): |
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.
Should have alternate=False in the parameters.
The new generator produces a line of 1-D points according to the equation: y = A((x-xf)/a)^n + yf The parameter yf acts as a focus point around which the point density will be highest, decreasing as we move away from it. The generator takes the arguments axis, units, start, stop, focus, exponent (n), and divisor (a) - 'start' is used to find xf (where y(xf)=yf): xf = a * nth root(|start - focus|) - 'stop' determines the scan size: size = int(f^-1(stop)) - 'A' will be 1 or -1, determined from start, stop, focus and exponent arguments (the sign of 'a' is ignored) - If the exponent is even, it is assumed that we will pass through the focus point.
c912dbd to
ba7682d
Compare
| focus (float): Point of interest which will be most finely sampled | ||
| e.g. 7.112 (for Fe K edge) | ||
| exponent (int): If exponent is even, it is assumed we pass through the focus point. | ||
| divisor (float): Sign will be ignored. |
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.
alternate (bool) missing in argument documentation.
The new generator produces a line of 1-D points according to the
equation:
y = A((x-xf)/a)^n + yf
The parameter yf acts as a focus point around which the point density
will be highest, decreasing as we move away from it.
The generator takes the arguments axis, units, start, stop, focus,
exponent (n), and divisor (a)
xf = a * nth root(|start - focus|)
size = int(f^-1(stop))
arguments (the sign of 'a' is ignored)
through the focus point.