[mcstas-users] Problems with McStas 3.5.1

Peter Kjær Willendrup pkwi at dtu.dk
Thu Nov 21 10:08:49 CET 2024


Hi again Marcell,


Wrt. the plotting I have tracked down the problem to be an incompatibility between the current code in mcplot-pygtgraph and presence of pyside6 in the conda environment.

Here is what seems to be a functional cure on my system:

1) Take “ownership” (i.e. give yourself all levels of filesystem access) of c:\mcstas-3.5.1\miniconda3

2) Start an “environment terminal”

3) mamba uninstall pyside6


( Interestingly, this dependency has seemingly been pulled in my matplotlib - but only matplotlib-core is in fact needed for mcplot-matplotlib to remain functional… )


I aim to release a new McStas soon (likely 3.5.12 - 3.5.11 is already on conda-forge) that will contain a reasonable fix of the issue.


Let me know if the above workaround helps?


Best
Peter


On 20 Nov 2024, at 20.01, Peter Kjær Willendrup <pkwi at fysik.dtu.dk> wrote:

Hello again,

I forgot the attachment, here it is.

Peter

<Screenshot 2024-11-20 at 19.55.15.png>

On 20 Nov 2024, at 20.00, Peter Kjær Willendrup <pkwi at fysik.dtu.dk> wrote:

Dear Marcell,


Thank you for reporting these issues!

I have not seen the mcplot issue earlier, but have just reproduced it with a fresh installation. I will investigate further and come back with an update release soon. (The current code on the repo has the same issue in a fresh installation… Likely an issue related to a recent update of pyqtgraph.)
In the meantime you may potentially use mcplot-matplotlib as a workaround?


The mcdisplay-webgl issue is partially known, please try

1) removing your entire “local folder” C:\\Users\\mwolf\\AppData\\mcstas\\3.5.1\\
2) Start mcdisplay-webgl again (and be patient - this first startup may take minutes)
3) At the end you should be presented with terminal output like the attached - please ctrl + click on the link which should open the browser

If this also fails, mcdisplay-webgl-legacy is available as a fallback solution.

Best and hope this helps,

Peter


On 20 Nov 2024, at 16.31, Marcell Wolf via mcstas-users <mcstas-users at mcstas.org> wrote:


Dear all,

yesterady I received a new PC and now installed mcstas3.5.1. for Windows using the introduction on GitHub. Under Mcstas_gui I can run a simulation and can plot it using mcplot-pyqtgraph:

<4sXQxsp9PC7cAiVB.png>

When I now to have a look on a single graph I receive the following messages in the mcgui

<NbL0dhAJmG2VKqME.png>

And I have a second problem when I try to run to run a Trace using mcdisplay-webgl. When I let it run I am not able to copy the error code beause the window directly closes. But under Simulation/Display-3D I reveive the following messages within mcgui:

mcdisplay-webgl --default --no-output-files -n100 Pol_test.instr&


loading system configuration
C:\mcstas-3.5.1\bin\..\lib\tools\Python\mcdisplay\webgl
Executing C:\mcstas-3.5.1\bin\..\lib\tools\Python\mcdisplay\webgl\npminstall.bat
Installing npm / vite modules
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\App.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\main.tsx
2 Datei(en) kopiert.
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\common.css
1 Datei(en) kopiert.
1 Datei(en) kopiert.
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\dat.gui.min.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\jquery.min.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Lut.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\mcdisplay.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\OrbitControls.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\start-vite.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\three.min.js
7 Datei(en) kopiert.
1 Datei(en) kopiert.
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\addComponents.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\addRays.ts
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\AppContext.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\CameraContext.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\GridContext.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\InstrumentContext.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\PlotRangeContext.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\RaysContext.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\Contexts\SceneContext.tsx
9 Datei(en) kopiert
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\utils\fetch.ts
1 Datei(en) kopiert
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\data-utils\initInstrument.ts
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\data-utils\initRays.ts
2 Datei(en) kopiert
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\configure-scene-menu.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\ConfigureSceneMenu.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\axes-button\axes-button.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\axes-button\AxesButton.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\background-color-button\background-color-button.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\background-color-button\BackgroundColorButton.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\component-styler.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\ComponentStyler.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\color-picker\color-picker.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\color-picker\ColorPicker.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\dropdown\dropdown.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\dropdown\DropDown.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\dropdown-button\chevron.svg
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\dropdown-button\dropdown-button.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\component-styler\dropdown-button\DropDownButton.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\grid-buttons\grid-buttons.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\grid-buttons\GridButtons.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-menu.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\RaysMenu.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\next.svg
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\pause.svg
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\play.svg
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\previous.svg
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\rays-playback.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\rays-playback\RaysPlayback.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\show-all-rays\show-all-rays.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\show-all-rays\ShowAllRays.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\toggle-rays\toggle-rays.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\toggle-rays\ToggleRays.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\toggle-scatter-points\toggle-scatter-points.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\rays-menu\toggle-scatter-points\ToggleScatterPoints.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\view-buttons\view-buttons.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\configure-scene\view-buttons\ViewButtons.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\loading-indicator\loading-indicator.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\loading-indicator\LoadingIndicator.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\initializeScene.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\three-canvas.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\ThreeCanvas.jsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\views.js
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\info-view.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\InfoView.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\export-json-button\export-json-button.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\export-json-button\ExportJSONButton.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\import-json\import-json.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\info-view\import-json\ImportJson.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\two-d-view\two-d-view.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\two-d-view\TwoDView.tsx
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\two-d-view\chart\chart.css
C:\mcstas-3.5.1\lib\tools\Python\mcdisplay\webgl\\components\scene\two-d-view\chart\Chart.tsx
49 Datei(en) kopiert

> webgl at 1.0.0<mailto:webgl at 1.0.0> build
> vite build

Installing npm / vite modules - stderr:
npm error code ENOTEMPTY
npm error syscall rename
npm error path H:\McStas\NL2au_TofTof\VarA_actual_source\VarA_linear_elliptical_guide\Pol_test\mcstas\3.5.1\webgl\node_modules\acorn
npm error dest H:\McStas\NL2au_TofTof\VarA_actual_source\VarA_linear_elliptical_guide\Pol_test\mcstas\3.5.1\webgl\node_modules\.acorn-XvYENxZs
npm error errno -4051
npm error ENOTEMPTY: directory not empty, rename 'H:\McStas\NL2au_TofTof\VarA_actual_source\VarA_linear_elliptical_guide\Pol_test\mcstas\3.5.1\webgl\node_modules\acorn' -> 'H:\McStas\NL2au_TofTof\VarA_actual_source\VarA_linear_elliptical_guide\Pol_test\mcstas\3.5.1\webgl\node_modules\.acorn-XvYENxZs'
npm error A complete log of this run can be found in: C:\Users\mwolf\AppData\Local\npm-cache\_logs\2024-11-20T15_25_03_507Z-debug-0.log
Der Befehl "vite" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Done installing npm / vite modules
Instrument parameters for TOFTOF_NL2a_complete (Pol_test.instr)
Set value of instrument parameter Lam (double) [default='13']:
Set value of instrument parameter dLam (double) [default='12']:
Set value of instrument parameter with_choppers (double) [default='0']:
Set value of instrument parameter lambda (double) [default='5']:
Set value of instrument parameter speed (double) [default='12000']:
Set value of instrument parameter ratio (double) [default='4']:
Set value of instrument parameter revolutions (double) [default='0']:
Set value of instrument parameter slits_hor (double) [default='40']:
Set value of instrument parameter slits_vert (double) [default='80']:
Set value of instrument parameter f_dist_h (double) [default='2']:
Set value of instrument parameter f_dist_v (double) [default='2']:
Set value of instrument parameter m_h (double) [default='4.0']:
Set value of instrument parameter m_v (double) [default='4.0']:
Set value of instrument parameter guide_extension (double) [default='1']:
Set value of instrument parameter straight_guide (double) [default='0']:
INFO: Using directory: "H:\McStas\NL2au_TofTof\VarA_actual_source\VarA_linear_elliptical_guide\Pol_test\Pol_test_20241120_162509"
INFO: Using existing c-file: Pol_test.c
INFO: Using existing binary: Pol_test.exe
INFO: ===
instrument definition parsed
reading particle data...
Instrument parameters for TOFTOF_NL2a_complete (Pol_test.instr)
Set value of instrument parameter Lam (double) [default='13']:
Set value of instrument parameter dLam (double) [default='12']:
Set value of instrument parameter with_choppers (double) [default='0']:
Set value of instrument parameter lambda (double) [default='5']:
Set value of instrument parameter speed (double) [default='12000']:
Set value of instrument parameter ratio (double) [default='4']:
Set value of instrument parameter revolutions (double) [default='0']:
Set value of instrument parameter slits_hor (double) [default='40']:
Set value of instrument parameter slits_vert (double) [default='80']:
Set value of instrument parameter f_dist_h (double) [default='2']:
Set value of instrument parameter f_dist_v (double) [default='2']:
Set value of instrument parameter m_h (double) [default='4.0']:
Set value of instrument parameter m_v (double) [default='4.0']:
Set value of instrument parameter guide_extension (double) [default='1']:
Set value of instrument parameter straight_guide (double) [default='0']:
Simulation : on (null)
Lambda = 13.000000
Lambda delta (+/-) = 12.000000
Lambda min = 1.000000
Lambda max = 25.000000
speed ch1 = 200.000000
speed ch5 = 150.000000
w1_guide = 0.026267
h1_guide = 0.044111
Component a1 AT (0,0,0)
Component a_guide AT (0,0,0.081)
Component a_cstarget AT (0,0,0.176)
Component ColdSource AT (0,0,0.176)
Component PSD_filter AT (1.32722e-005,0,0.176109)
Component guide_gravity AT (0.00121984,0,0.186036)
Component PSD_before_POL AT (1.20779,0,10.113)
Component pol_guide_vmirror AT (1.20779,0,10.113)
Component meanpollambda_monitor AT (1.26811,0,10.6093)
Component PSD_after_POL AT (1.26811,0,10.6093)
[TOFTOF_NL2a_complete] Initialize
*** TRACE end ***

Save [TOFTOF_NL2a_complete]
Detector: PSD_filter_I=7.64027e+013 PSD_filter_ERR=1.76973e+013 PSD_filter_N=100 "PSD_filter.psd"
Detector: PSD_before_POL_I=1.11149e+010 PSD_before_POL_ERR=6.36169e+009 PSD_before_POL_N=8 "PSD_before_POL.psd"
Detector: meanpollambda_monitor_I=-2.9405 meanpollambda_monitor_ERR=0.657516 meanpollambda_monitor_N=5 "meanpollambda_monitor.dat"
Detector: PSD_after_POL_I=9.02297e+009 PSD_after_POL_ERR=6.244e+009 PSD_after_POL_N=5 "PSD_after_POL.psd"

Finally [TOFTOF_NL2a_complete: .]. Time: 0 [s]

starting particle parsing
ended particle parsing
Launching WebGL... Once launched, server will run for 300 s
Traceback (most recent call last):
File "C:\mcstas-3.5.1\bin\\../lib/tools\Python\mcdisplay\webgl\mcdisplay.py", line 298, in <module>
main(**args)
File "C:\mcstas-3.5.1\bin\\../lib/tools\Python\mcdisplay\webgl\mcdisplay.py", line 269, in main
write_browse(instrument, raybundle, dirname, instr, timeout, **kwds)
File "C:\mcstas-3.5.1\bin\\../lib/tools\Python\mcdisplay\webgl\mcdisplay.py", line 115, in write_browse
copytree(source.joinpath('dist'), dest)
File "c:\mcstas-3.5.1\miniconda3\Lib\shutil.py", line 598, in copytree
with os.scandir(src) as itr:
^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'C:\\Users\\mwolf\\AppData\\mcstas\\3.5.1\\webgl\\dist'

Do you know already this problems? And do you have any ideas to solve them?

Best regards,

--
Dr. Marcell Wolf
Time-of-flight spectrometer TOFTOF
Technical University of Munich
Forschungs-Neutronenquelle
Heinz Maier-Leibnitz (FRM II)
Lichtenbergstr. 1
85748 Garching
Germany
Tel.: +49 (0)89 289-14975
Fax: +49 (0)89 289-14989
marcell.wolf at frm2.tum.de<mailto:marcell.wolf at frm2.tum.de>
www.mlz-garching.de<http://www.mlz-garching.de/>
www.frm2.tum.de<http://www.frm2.tum.de/>

_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users


Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent

DTU Physics

<image001.gif>


Technical University of Denmark


<image002.gif>


Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby

Main office at
ESS DMSC
Building 305
DK-2800 Kongens Lyngby

Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk



Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent

DTU Physics

<image001.gif>


Technical University of Denmark


<image002.gif>


Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby

Main office at
ESS DMSC
Building 305
DK-2800 Kongens Lyngby

Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk



Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent

DTU Physics

[image001.gif]


Technical University of Denmark


[image002.gif]


Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby

Main office at
ESS DMSC
Building 305
DK-2800 Kongens Lyngby

Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20241121/85137f37/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20241121/85137f37/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20241121/85137f37/attachment-0003.gif>


More information about the mcstas-users mailing list