mcrun: allow multiscan -M with list -L - #2618
Conversation
|
@jorobledo could you have a look at / review this small development? I guess it will come in handy for PaNRAID! Once this is done there is a follow-up review task for you @farhi over at #2619 (builds on this PR - the commits from this one is available in that stack also.) |
|
I tested it, and it's looking cool! ran something like
Seems very useful. What would be the option to merge two nexus files in one? Say you run two scans, each one creates a nexus, and then want to create a dataset from the two? Similar to your append, but more like a concatenate. Other question, ca you set some kind of linspace or does it have to be the list of values separated by commas? |
|
I guess we can add an option to allow appending to an existing dataset, will see about that later. -N now takes both a single value and a list of bins (between usual par=a,b) so yes linspace -L is list mode par=a,d,f,z Both can be combined with -M to become multi-dimensional. |
|
Yes, but the linear spacing is the same for all vars of the type var1=a,b var2=c,d . Maybe you want 10 points for var1 and 20 points for var2. Sometimes you also want logarithmic spacing (base 10 for example). These options would make it fully versatile for dataset generation. I guess at this point it's easier of course through python and just allow to concatenate nexus files conveniently. |
|
Different number of points for par1 and par2 is there in the linear case with -N2,10 par1=a,b par2=c,d -M Log mode - can be done via lists and -M for now |
Free-form text area
Please describe what your PR is adding in terms of features or bugfixes:
Declaration of use of AI-tools
Claude, via prompts:
Initial prompt:
New task relating to the mcrun tool:
mcrun can currently:
The linear method can become multi-dimensional if -M is given (with the assumption that -N provides the same 'resolution' / number of samplings along all parameter dimensions)
Please:
In -M mode, allow different number of samplings along differnt dimensions (I am thinking via a 'list' -N=a,b,c,d
Allow to combine -M with -L which is not currently possible
Secondary prompt:
For a scan of this type which is now allowed
(i.e. including parameters provided via list that are not numerical) the resulting scan-dataset (i.e. the mccode.sim/mccode.dat generated from mcrun) is not plottable (example attached).
I also attach mccode.dat and mccode.sim that is plottable, generated via
Can you implement 'index-variable(s)' generated from non-numeric lists to go into the plotting output so that the generated mccode.dat/mccode.sim for such a scan is now plottable?
(a constraint is that the formal format of mccode.dat stays the same)
Development OS / boundary conditions
Please describe what OS you developed and tested your additions on, and if any special dependencies are required:
PR Checklist for contributing to McStas/McXtrace
For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:
My contribution contains something else