Skip to content
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

new cmdline argument "-beam_center" #285

Open
alkichigin opened this issue Feb 1, 2021 · 3 comments
Open

new cmdline argument "-beam_center" #285

alkichigin opened this issue Feb 1, 2021 · 3 comments
Assignees
Labels
comp-UI Related to user interface (command line, input files) maintainability Simplifies further code development (standardization, robustness) pri-Medium Worth assigning to a milestone
Milestone

Comments

@alkichigin
Copy link

alkichigin commented Feb 1, 2021

For beams that have a definition of the center of the beam, it could be more convenient to exclude the coordinates of beam's center from the "-beam" argument and make it a separate argument "-beam_center".
For example, in EELS for an electron of 100 keV energy moving through (50,0,0) in the default propagation direction (0,0,1) instead of writing
adda -beam electron 100 50 0 0,
one would write
adda -beam electron 100 -beam_center 50 0 0.
This would be easier to parse, especially when beam center is optional, or if we introduce units support (#275).

@myurkin myurkin added comp-UI Related to user interface (command line, input files) maintainability Simplifies further code development (standardization, robustness) pri-Medium Worth assigning to a milestone labels Feb 2, 2021
@myurkin myurkin added this to the 1.5 milestone Feb 2, 2021
@myurkin
Copy link
Member

myurkin commented Feb 2, 2021

Overall, this feature should be easy to implement. But here are a few things to consider:

  1. For new beam options (bessel, electron) we can exclusively use -beam_center from the start (i.e. -beam bessel... won't support coordinates at all).
  2. For existing Gaussian beams we should keep backward compatibility (until v. 2.0). For example, both -beam davis3 5 1 2 3 and -beam davis3 5 -beam_center 1 2 3 should work, but the former will produce a warning about being deprecated. Moreover, -beam davis3 5 1 2 3 -beam_center 1 2 3 should produce an error. When we reach v. 2.0 the deprecated warning will be changed to informative error message (or the Gaussian beams will be rewritten completely - Exact Gaussian beam #89).
  3. For plane waves, -beam_center ... should also work similar to all other beams. It will have no effect on the Mueller matrix and cross sections, but will change (by constant phase factor) the internal fields (both incident and total) and polarizations and, hence, the amplitude matrix.
  4. Accurate description of new/changed command line options in internal help system (-h) and in the manual are important.

/cc @stefaniagl

@alkichigin
Copy link
Author

Implemented -beam_center option in my fork https://github.com/alkichigin/adda according to the above guidelines

@myurkin
Copy link
Member

myurkin commented Dec 7, 2021

After the pull request (#304) will be merged we still need the following to finalize this issue (to be submitted as the new pull request):

  • new tests in tests/2exec (new command lines in suites, and potentially ignores for comparison with previous versions, or ignoring deprecated warnings).
  • new tests in tests/2equiv (specification of -beam_center vs. an argument to -beam , independence of plane-wave results of beam_center).
  • description of new option in the manual (and changes to other -beam options, including deprecated warnings), also mention that unit amplitude of incident beam is now assumed at beam center rather than at particle center.

@stefaniagl stefaniagl mentioned this issue Dec 22, 2021
13 tasks
@stefaniagl stefaniagl mentioned this issue Dec 30, 2021
13 tasks
@myurkin myurkin linked a pull request Dec 30, 2021 that will close this issue
13 tasks
@myurkin myurkin removed a link to a pull request Dec 30, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-UI Related to user interface (command line, input files) maintainability Simplifies further code development (standardization, robustness) pri-Medium Worth assigning to a milestone
Projects
None yet
Development

No branches or pull requests

2 participants