-
Notifications
You must be signed in to change notification settings - Fork 10
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
ps[booster].py: model_dir as input (similar to lhc.py) #139
Comments
For future refenrece: I am quite sure this has nothing to do with entrypoint. Entrypoint is just the function that handles the arguments. |
@elenafol do you have a testsetup for this? If you call it as as function, they are both nat_tune_x and nat_tune_y, which lead to the ArgumentError message. |
Using --nattunex, --nattuney: afs/cern.ch/work/o/omc/anaconda/bin/python /afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/generate_fullresponse_pandas.py --accel psbooster --creator madx --deltak 0.00002 --variables MQSl MQSr MQSa --outfile /afs/cern.ch/work/e/efol/public/betabeatGui/temp/2018-06-19/models/PSBOOSTER/psbModel/Fullresponse_pandas --model_dir /afs/cern.ch/work/e/efol/public/betabeatGui/temp/2018-06-19/models/PSBOOSTER/psbModel --debug --nattunex 0.186 --nattuney 0.294 DEBUG | Unknown options: ['--nattunex', '0.186', '--nattuney', '0.294'] | utils.entrypoint |
That should be correct, as it is only a debug message. Does it run? |
No, it gives me the error similar to the one I mentioned before: Traceback (most recent call last): |
I see the problem. The nattune-error was misleading. The actual problem is, that lhc.py has been rewritten to accept a model as input and fullresponse_pandas makes use of this. fullresponse_pandas actually requires a model folder as input and passes it on to psbooster.py which is wondering, where it's options are. tl,dr: psbooster.py needs to be rewritten to accept model_dir as input. |
Running generate_fullresponse_pandas.py for psbooster (which will not work due to missing json template, but the arguments are supposed to be okay), following error message was produced, if no nattune is defined in the command arguments:
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/model/accelerators/psbooster.py", line 123, in init
opt = parser.parse(*args, **kwargs)
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/utils/entrypoint.py", line 149, in parse
options = self._handle_kwargs(kwargs)
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/utils/entrypoint.py", line 255, in _handle_kwargs
options = self.dictparse.parse_arguments(kwargs)
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/utils/dict_tools.py", line 292, in parse_arguments
return self._parse_options(copy.deepcopy(arguments), self.dictionary)
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/utils/dict_tools.py", line 248, in _parse_options
checked_dict[key] = DictParser._check_value(key, arg_dict, param_dict)
File "/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/utils/dict_tools.py", line 199, in _check_value
key, param.help)
utils.dict_tools.ArgumentError: 'nat_tune_y' required in options.
After adding the required option, the error message is:
Unknown options: ['nat_tune_y', '0.294', 'nat_tune_x', '0.0186'] | utils.entrypoint
Also, the natural tune options for LHC are called nattuney, nattunex. For psbosster the format is nat_tune_y, nat_tune_x, which should be changed to follow the same naming convention.
The text was updated successfully, but these errors were encountered: