Skip to content

Conversation

@douglaswinter
Copy link
Collaborator

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.

@c-mita
Copy link
Contributor

c-mita commented Mar 8, 2018

Can you rebase and add to the documentation (create docs/powertermgenerator.rst and add it to docs/index.rst?

sign is determined by start, stop, focus and exponent parameters
"""

def __init__(self, axis, units, start, stop, focus, exponent, divisor):
Copy link
Contributor

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.
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.
Copy link
Contributor

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.

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