Skip to content
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

mcdisplay-webgl and mcdisplay-pyqtgraph commands not found #1763

Closed
Momsnoodle opened this issue Nov 19, 2024 · 8 comments
Closed

mcdisplay-webgl and mcdisplay-pyqtgraph commands not found #1763

Momsnoodle opened this issue Nov 19, 2024 · 8 comments

Comments

@Momsnoodle
Copy link

Recently, I have started using the app for some X-ray simulations. The plots are working fine, However, when I wanted to see some 2D or 3D simulations, here comes up the error message.

Screenshot 2024-11-19 at 10 49 48 And then I tried the Mcstas and it seemed like it was working. How can I fix this problem? The version I am using is the Mcxtrace 3.5.1 and the computer is a MacBook Pro with M3 and the system version is macOS Sequoia 15.1.
@willend
Copy link
Contributor

willend commented Nov 19, 2024

Hi @Momsnoodle

Looks weird that you seem to get "McStas" oriented display utils from "McXtrace"? Is the screenshot from one or the other?

Just to be sure something is not fundamentally wrong with the provided installer, I am now (re-)installing my local McXtrace 3.5.1 via the bundle available at http://downloads.mcxtrace.org/mcxtrace-3.5.1/macOS/ - did you get your McXtrace this way?

As a rule, the McXtrace tools differ from their McStas counterpart by an mx instead of mc:

  • mcgui in McStas is mxgui in McXtrace
  • mcrun in McStas is mxrun in McXtrace
  • mcplot in McStas is mxplot in McXtrace
  • mcdisplay in McStas is mxdisplay in McXtrace etc.

@Momsnoodle
Copy link
Author

Hi @Momsnoodle

Looks weird that you seem to get "McStas" oriented display utils from "McXtrace"? Is the screenshot from one or the other?

Just to be sure something is not fundamentally wrong with the provided installer, I am now (re-)installing my local McXtrace 3.5.1 via the bundle available at http://downloads.mcxtrace.org/mcxtrace-3.5.1/macOS/ - did you get your McXtrace this way?

As a rule, the McXtrace tools differ from their McStas counterpart by an mx instead of mc:

  • mcgui in McStas is mxgui in McXtrace
  • mcrun in McStas is mxrun in McXtrace
  • mcplot in McStas is mxplot in McXtrace
  • mcdisplay in McStas is mxdisplay in McXtrace etc.

It is the McXtrace and yes I used the link to download it

@Momsnoodle
Copy link
Author

Hi @Momsnoodle

Looks weird that you seem to get "McStas" oriented display utils from "McXtrace"? Is the screenshot from one or the other?

Just to be sure something is not fundamentally wrong with the provided installer, I am now (re-)installing my local McXtrace 3.5.1 via the bundle available at http://downloads.mcxtrace.org/mcxtrace-3.5.1/macOS/ - did you get your McXtrace this way?

As a rule, the McXtrace tools differ from their McStas counterpart by an mx instead of mc:

  • mcgui in McStas is mxgui in McXtrace
  • mcrun in McStas is mxrun in McXtrace
  • mcplot in McStas is mxplot in McXtrace
  • mcdisplay in McStas is mxdisplay in McXtrace etc.

Screenshot 2024-11-19 145239
And I've just tried with Windows and it shows the same error

@willend
Copy link
Contributor

willend commented Nov 19, 2024

Ah now I partly understand! The --default in the command gave away that you are using Simulation->Display-3D.

It seems that when using the Simulation-> entires the commands are in fact hard-coded to mcdisplay- ...
(Yes, a proper bug and would naturally affect the McXtrace installations only...)

Could you instead try pressing Run and on the subsequent dialogue switch from Simulation to Trace to see if this gives you any more mileage?

@Momsnoodle
Copy link
Author

Ah now I partly understand! The --default in the command gave away that you are using Simulation->Display-3D.

It seems that when using the Simulation-> entires the commands are in fact hard-coded to mcdisplay- ... (Yes, a proper bug and would naturally affect the McXtrace installations only...)

Could you instead try pressing Run and on the subsequent dialogue switch from Simulation to Trace to see if this gives you any more mileage?

Screenshot 2024-11-19 at 15 29 32 Screenshot 2024-11-19 at 15 30 39 There is still some problem.

@willend
Copy link
Contributor

willend commented Nov 19, 2024

@Momsnoodle I believe I have a fix:

You may replace the mxgui.py (residing in your McXtrace installations) by the one found here:
https://raw.githubusercontent.com/willend/McCode/refs/heads/fix-issue-1763/tools/Python/mcgui/mcgui.py - "save as" and remember to name correctly ;-)

Let me know if this fixes the issues you experienced.

@Momsnoodle
Copy link
Author

@Momsnoodle I believe I have a fix:

You may replace the mxgui.py (residing in your McXtrace installations) by the one found here: https://raw.githubusercontent.com/willend/McCode/refs/heads/fix-issue-1763/tools/Python/mcgui/mcgui.py - "save as" and remember to name correctly ;-)

Let me know if this fixes the issues you experienced.

It works! Thank you so much!
By the way, it took me a while to find where the file is. In case the others have the same problem, here is the directory: /Applications/McXtrace-3.5.1.app/Contents/Resources/miniconda3/share/mcxtrace/tools/Python/mxgui

@willend
Copy link
Contributor

willend commented Nov 20, 2024

Good to hear. :-) And yes it is a bit buried... ;-)

Sorry, I should have given you the path or a hint to use an "environment terminal" hack: find $CONDA_PREFIX -name mxgui.py

On Windows you can find the file in your c:\mcxtrace-3.5.1\lib\tools\Python\mxgui folder (McStas/McXtrace wille eventually also become fully "built into" conda also on Windows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants