-
Notifications
You must be signed in to change notification settings - Fork 13
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
method to allow adding an additional directory to find components #50
base: master
Are you sure you want to change the base?
Conversation
This update would make McStasScript use the components in the custom folder, but the actual McStas simulation would not look in the custom folder, and thus McStasScript would not be in sync with the McStas behaviour. Would need to modify McStas behaviour in order for this to work, but I am not aware of any features in McStas that would allow this. Will ask around to hear if other McStas developers know of a potential solution. |
McStas has the following option from the command line: |
McStasScript uses the mcrun command which does not have the --search-dir option. If one compiles the mcstas code into c with the mcstas command, that options exists, but then one also have to do a system dependent compile step from .c to executable. I am not prepared to take on the scope in McStasScript. Perhaps we could instead make a run folder with links to all the files in the component folder? That way the component folder would not be poluted by the genrated files, nor would the components / data files need to be duplicated which would take up unnecessary space. |
McStas 3.3 has a couple of relevant features in this respect, from the CHANGELOG, on the python level:
And in the McStas grammar as such:
|
81bd478
to
fc1f343
Compare
fc1f343
to
d1521c3
Compare
By default components are looked for in the current working directory or the standard McStas folders. When using the instrument database, it is necessary to place components in several special folders. This method is currently used in the description of the ThALES instrument (prototype).