[mcxtrace-users] [mcstas-users] Ncount doubled? McStas 3.3
Peter Kjær Willendrup
pkwi at fysik.dtu.dk
Wed May 10 16:45:57 CEST 2023
Hi all,
I can now report that the cause of the issue has been located and fixed in the development tree toward the next McStas 3.x and McXtrace 3.x releases.
You can also rest assured that the issue was of a cosmetic nature only, only affecting output headers, not the actual number of simulated / saved events.
Best,
Peter
On 18 Apr 2023, at 15.13, Peter Kjær Willendrup <pkwi at fysik.dtu.dk> wrote:
Hi both,
OK, thanks for testing.
Looking on my machine here with McStas 3.3, it seems the the first entry in mccode.sim (i.e. the “simulation level”) is OK, whereas the entries for any monitor after has been doubled:
McStas simulation description file for BNL_H8.
Date: Tue Apr 18 12:02:56 2023
Program:
begin instrument: BNL_H8
File: BNL_H8_20230418_120254/mccode
Source: BNL_H8.instr
Parameters: lambda(double)
Trace_enabled: yes
Default_main: yes
Embedded_runtime: yes
end instrument
begin simulation: BNL_H8_20230418_120254
Format: McCode with text headers
URL: http://www.mccode.org
Creator:
Instrument: BNL_H8.instr
Ncount: 1000000
Trace: no
Gravitation: no
Seed: 1681812175442876
Directory: BNL_H8_20230418_120254
Param: lambda=2.36
end simulation
begin data
Date: Tue Apr 18 12:02:57 2023 (1681812177)
type: array_2d(20, 20)
Source: BNL_H8 (BNL_H8.instr)
component: D0_Source
position: 0 0 0.0001
title: PSD monitor
Ncount: 2000000
filename: D0_Source.psd
statistics: X0=-0.00187139; dX=0.864864; Y0=0.0044862; dY=1.56205;
signal: Min=6.0781e-06; Max=1.04372e-05; Mean=7.97501e-06;
values: 0.00319 1.39945e-05 51960
xvar: X
yvar: Y
xlabel: X position [cm]
ylabel: Y position [cm]
zvar: I
zlabel: Signal per bin
xylimits: -1.5 1.5 -2.7 2.7
variables: I I_err N
end data
...
I would think this “only" a header / summary data - issue, but of course annoying. I don’t believe the actual number of simulated events is actually doubled.
Will investigate further during the next days and report back.
Best,
Peter
On 18 Apr 2023, at 13.19, Emmanuel FARHI <emmanuel.farhi at synchrotron-soleil.fr> wrote:
I can confirm this also holds for McXtrace, but only for the 'legacy' code.
McXtrace 3.x is OK.
Emmanuel.
Le 18/04/2023 à 13:07, Richard Wagner a écrit :
Hi Peter,
as an example I took the BTsimple.instr from the template section.
The command to run McStas is: mcrun BTsimple.instr -d BTsimple_20230418_115509 -n 1000 lambda=10 dlambda=9.9 maxhd=3 maxvd=3 gw=0.1 gh=0.1 gL=50 gm=6 delta1=0 delta2=0
and the reads (just as an example)
BT_in.dat
# Format: McCode with text headers # URL: http://www.mccode.org<http://www.mccode.org/> # Creator: # Instrument: BTsimple.instr # Ncount: 2000 # Trace: no # Gravitation: no # Seed: 1681811710726221 # Directory: /Users/wagnerrichard/BTsimple_20230418_115509 # Param: lambda=10 # Param: dlambda=9.9 # Param: maxhd=3 # Param: maxvd=3 # Param: gw=0.1 # Param: gh=0.1 # Param: gL=50 # Param: gm=6 # Param: delta1=0 # Param: delta2=0 # Date: Tue Apr 18 11:55:10 2023 (1681811710) # type: array_1d(101) # Source: BTsimple (BTsimple.instr) # component: BT_in # position: 0 0 2 # title: Wavelength monitor # Ncount: 2000 # filename: BT_in.dat # statistics: X0=2.95806; dX=1.79349; # signal: Min=0; Max=1.42052e+11; Mean=7.26371e+09; # values: 7.33634e+11 2.44642e+11 34 # xvar: L # yvar: (I,I_err) # xlabel: Wavelength [AA] # ylabel: Intensity # xlimits: 0.1 19.9 # variables: L I I_err N 0.198019802 0.06290653129 0.06290653129 1 0.3940594059 0 0 0 0.5900990099 0 0 0 0.7861386139 0 0 0 0.9821782178 8.634588395e+10 8.634588395e+10 1 1.178217822 1.129377287e+11 1.129377287e+11 1 1.374257426 0 0 0 1.57029703 0 0 0 1.766336634 0 0 0 1.962376238 0 0 0 2.158415842 0 0 0 2.354455446 0 0 0 2.55049505 1.045974734e+11 1.045974734e+11 1 2.746534653 0 0 0 2.942574257 8.997598489e+10 8.997598489e+10 1 3.138613861 7.835386438e+10 7.835386438e+10 1 3.334653465 1.420521026e+11 1.004534555e+11 2 3.530693069 0 0 0 3.726732673 0 0 0 3.922772277 4.930911027e+10 4.930911027e+10 1 4.118811881 0 0 0 4.314851485 0 0 0 4.510891089 0 0 0 4.706930693 0 0 0 4.902970297 0 0 0 5.099009901 0 0 0 5.295049505 0 0 0 5.491089109 0 0 0 5.687128713 0 0 0 5.883168317 2.834814784e+10 2.005320461e+10 2 6.079207921 0 0 0 6.275247525 0 0 0 6.471287129 0 0 0 6.667326733 1.878195926e+10 1.328092168e+10 2 6.863366337 0 0 0 7.059405941 0 0 0 7.255445545 0 0 0 7.451485149 0 0 0 7.647524752 5150986989 5150986989 1 7.843564356 0 0 0 8.03960396 4013292994 4013292994 1 8.235643564 3595007505 3595007505 1 8.431683168 0 0 0 8.627722772 0 0 0 8.823762376 0 0 0 9.01980198 0 0 0 9.215841584 2189836065 2189836065 1 9.411881188 1988533204 1988533204 1 9.607920792 0 0 0 9.803960396 0 0 0 10 1492967095 1492967095 1 10.1960396 0 0 0 10.39207921 0 0 0 10.58811881 0 0 0 10.78415842 0 0 0 10.98019802 0 0 0 11.17623762 0 0 0 11.37227723 848524385.4 848524385.4 1 11.56831683 776540913.4 776540913.4 1 11.76435644 704975245.4 704975245.4 1 11.96039604 0 0 0 12.15643564 0 0 0 12.35247525 0 0 0 12.54851485 0 0 0 12.74455446 0 0 0 12.94059406 0 0 0 13.13663366 0 0 0 13.33267327 0 0 0 13.52871287 0 0 0 13.72475248 361109386.4 361109386.4 1 13.92079208 0 0 0 14.11683168 0 0 0 14.31287129 0 0 0 14.50891089 272324491.7 272324491.7 1 14.7049505 0 0 0 14.9009901 241800376.7 241800376.7 1 15.0970297 224371882.4 224371882.4 1 15.29306931 203464827.5 203464827.5 1 15.48910891 0 0 0 15.68514851 182210050 182210050 1 15.88118812 173421371.5 173421371.5 1 16.07722772 0 0 0 16.27326733 0 0 0 16.46930693 0 0 0 16.66534653 140822062.6 140822062.6 1 16.86138614 0 0 0 17.05742574 124243190.4 124243190.4 1 17.25346535 0 0 0 17.44950495 0 0 0 17.64554455 0 0 0 17.84158416 0 0 0 18.03762376 91358644.93 91358644.93 1 18.23366337 90222429.45 90222429.45 1 18.42970297 0 0 0 18.62574257 0 0 0 18.82178218 0 0 0 19.01782178 0 0 0 19.21386139 0 0 0 19.40990099 65966180.97 65966180.97 1 19.60594059 0 0 0 19.8019802 0 0 0
Holds for the rest of the dat-files and for simulations with higer n numbers
I just took n = 1000 for demonstration purposes.
Best
Richard
On 18/04/2023 12:07, Peter Kjær Willendrup wrote:
Hi Richard,
Hmm, no this sounds strange?
Could you help by providing a little bit more context? I.e.
* What are you running?
* How?
* Where do you read off the resulting Ncount?
Best,
Peter
On 18 Apr 2023, at 11.58, Richard Wagner <wagnerrichard at ill.fr><mailto:wagnerrichard at ill.fr> wrote:
Dear McStas Experts and Community
Is there a reason that the in Mcstas 3.3 Ncount is twice as high then the "Ray count" selected?
eg.: -n 1000 -> # Ncount: 2000
Best
Richard
--
Richard Wagner
Postdoctoral Research Engineer
Nuclear and Particle Physics Group
Institut Laue-Langevin - ILL
71, avenue des Martyrs
CS 20156
38042 Grenoble Cedex 9
France
www.ill.eu<x-msg://1/www.ill.eu>
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
--
Richard Wagner
Postdoctoral Research Engineer
Nuclear and Particle Physics Group
Institut Laue-Langevin - ILL
71, avenue des Martyrs
CS 20156
38042 Grenoble Cedex 9
France
www.ill.eu<x-msg://3/www.ill.eu>
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
--
/ ___|__/\_| | | ____|_ _| | FARHI Emmanuel
\___ \\ | | | _| | || | Div Exp/Data Reduction and Analysis Team
___) /_ _| |___| |___ | || |___ Tel : +33 (1) 69 35 96 04<callto:+33%20%281%29%2069%2035%2096%2004>
|____/ \/ |_____|_____|___|_____| Saint-Aubin BP 48 - 91192 GIF/YVETTE CEDEX
SYNCHROTRON http://www.synchrotron-soleil.fr<http://www.synchrotron-soleil.fr/>
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcxtrace.org/pipermail/mcxtrace-users/attachments/20230510/456ed777/attachment-0001.html>
More information about the mcxtrace-users
mailing list