You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following bug-report was sent by Peter Konik (BNC) to mcstas-users:
Dear colleagues,
I’m writing to report probably undesired behavior of McStasScript we discovered together with Chuyi Huang from JCNS.
In McStas if I make a COPY of a component, which also used EXTEND block, this additional code is not copied as well. I believe this is the correct approach since it allows e.g. to put different SCATTERED flags on each of the copied components separately, which comes handy.
However when McStasScript generates an instrument based on the same code, it will copy EXTEND block as well. In more complex situations where WHEN conditions are used this could lead to unexpected behavior.
Please find attached two files. Compare lines 255-286 in the native one and lines 268-307 in the generated one.
This is a good point, the behavior of copy should mirror the one in McStas to align the use of the packages. I will reset the EXTEND, GROUP, JUMP, SPLIT etc at copy. In the meantime, you can reset EXTEND on a copied component with comp.EXTEND=""
The following bug-report was sent by Peter Konik (BNC) to mcstas-users:
SPHERES_native_mcstas.instr.txt
SPHERES_generated_mcstasscript.instr.txt
The text was updated successfully, but these errors were encountered: