-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 generate lookup tables #14
base: main
Are you sure you want to change the base?
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
da95e8f
to
c2ddc5e
Compare
1d38f2b
to
a0f8589
Compare
a0f8589
to
ac9d2ca
Compare
for this PR to be approved,all the 'test plans' need to be moved into github comments instead |
need to consolidate the plans and make them make sense, run in sim or on a beamline |
def calculate_derivative_maxima(data: np.ndarray) -> List[float]: | ||
x = sp.Symbol("x") | ||
y = sp.interpolating_spline(3, sp.lambdify(x, data)) | ||
derivative = y.diff(x) | ||
critical_points = sp.solve(derivative, x) | ||
return [float(cp) for cp in critical_points if cp.is_real] | ||
|
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.
x = motor position
y = transmission strength
presumably currently y = data, but we need to be passing also the values of x, so data could be array[tuple(float, float)] or otherwise passing in x?
9215ce7
to
7120b94
Compare
from conversation with @iain-hall I figured that a couple of different kinds of alignment were mixed up in the code here. Will adjust on Monday the 19th |
adjusted, still need more in-person chat with the scientist to perfect the alignment definition |
will investigate today at 2:30 |
manual steps: setup steps:
XFAS community uses Ev for initial energy and inverse angstorms for final energy not going through all the elements at each run, it's per user run. that is at the moment, we could do all the elemnts at the start of the run. the monochromator Bragg angle corresponds to the element - energies to excite the metallic orbitals of harmonics are learned empirically, about the relationship Silicon111 is the monochromator where every element has a dedicated harmonic - the lower Z elements are at lower harmonics Monochromator has both the crystal and the energy Mo has highest energy, so at the highest harmonic - 19 if we know that someone will use Ga scan, the beamline stuff know to cover the given energy easier for humans to read this angle start, angle end as energy in eV. for GDA the energy space is discretized into gears - harmonics? maybe the insertion device or optics teams? so during the alignment we pause the conversion between harmonics and energies. physical order: scanning proper
physcial cleanup stage
calculation stage - in IDL
when running the script, generous with the range, so that it's updated generously. |
there is also alignment of perpendicular gap a number of energies, very similar to the idgap alignment |
Gaussian fitting vs peak fitting. maybe there was an option to use it, rather than the peak, possible other |
sources of issues when running manually:
|
right now for one element - maybe 10 minutes |
if all automatic, twice a week - elements for a specific user otherwise the whole energy range at the end of the run. so either at the beginning of the experiment, or at the end of it. need full beam for the, startup beam is full beam too, it's all good. |
@iain-hall the narrowed down version of the i18 code is in the Much of the logic might go into the dodal undulator device, I hope to figure out more in the Friday meeting |
No description provided.