-
Notifications
You must be signed in to change notification settings - Fork 29
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
allow fit chrom with radon #349
Conversation
atmat/lattice/atfitchrom.m
Outdated
@@ -25,7 +25,7 @@ | |||
% | |||
% See also ATFITTUNE | |||
|
|||
check_radiation(ring,false); | |||
%check_radiation(ring,false); | |||
[deltaP,varargin]=getoption(varargin,'DPStep'); | |||
[deltaS,varargin]=getoption(varargin,'HStep',1.0e-5); | |||
[dpp,varargin]=getargs(varargin,0.0,'check',@(arg) isscalar(arg) && isnumeric(arg)); |
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 should be
[dpp,varargin]=getargs(varargin,NaN,'check',@(arg) isscalar(arg) && isnumeric(arg));
to avoid warnings if dpp is provided in 6D
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.
Ah thanks! My matlab skills are very limited, would you have time to fix this? Also we found a bug in atenergy() that is still looking for the harmonic number on cavities.
We need these fixed for tomorrow for the restart....
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, I take this PR, it's a single line to change. What about atenergy() ?
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 you handle atenergy() as well?
|
About |
Well the problem is that some function (atreduce?) are removing the HarmonicNumber form the cavities so atenergy returns a NaN |
Ok, but I still do not understand why this field is now removed while it was (or is still) mandatory. Does you problem occur on the master branch, or did anything change in another branch ? |
@simoneliuzzo faced the issue I cannot tell you much more |
I create a new branch for For this PR, I don't have the possibility to test it, so I'm waiting for Simone and/or Nicola's approval. |
Hi Laurent, The harmonic number disappears after calling to atclean. I think this function is not part of AT. I keep looking with @carmignani . thank you for your help! ciao |
Still get a crash, it's not ready |
@simoneliuzzo: Did Concerning this PR, there are still problems… |
I think I found where to fix the HarmonicNumber disappeared. atclean looks for the fields output of [req,opt]=RFCavityPass |
OK, clear. We're been too fast in removing it from the mandatory fields. Anyway, a revised |
Ready for merging. It was more tricky than expected. |
ok for me. |
atfitchrom was requesting rad off in matlab: this is breaking ESRF operation tools!
This branch uses directly atlinopt6 to compute the chromaticity, rad off is not required anymore.
!!!Warning: with radiation ON the initial dp offset is ignored, frequency should be used instead!!!
For future developments, especially on matlab please make sure the implementation is fully backward compatible
because this has strong impact on operation tools relying on AT. New errors coming from check_radiation() are
difficult to handle if not foreseen