[mcstas-users] Can' Scan McStas3 on Win11
Peter Kjær Willendrup
pkwi at dtu.dk
Thu Jun 13 22:30:59 CEST 2024
Hi Todd.
I reproduce your issue with McStas 3.4 - also here on my mac, and looking a bit further was actually known already :-)
https://github.com/McStasMcXtrace/McCode/issues/1551
The problem is that the scan-tool in 3.4 and earlier attempts to pick up monitor-data from “datafiles” and in fact the simple Monitor() does not store output files in those versions.
A simple workaround is to replace the (scalar counting) Monitor() instances with (pixellated) PSD_monitor(), see attached instr file.
( For reference the issue has in fact been fixed in the McStas sources and will disappear with the next release of McStas. :-) )
Hope the workaround is OK for your use - and sorry for the inconvenience.
All the best, ,
Peter
On 13 Jun 2024, at 21.55, Sherline, Todd <sherlinete at ornl.gov> wrote:
Peter,
Thank you for the reply. Since my previous email, I tested scans using BNL_H9.instr as downloaded from the McStas site. I was able to scan over lambda using that instr file.
I’ve attached the instr I’m using and the supplementary files it calls. When I run it with a single set of parameters, it runs fine. When I scan over a parameter, it generates output for the first value within a subdirectory “0” and creates an empty mccode.dat file.
The screenshot shows what I type in. The scan is over the IncidentCollRadius and has argument 0.002,0.0025, but it got cut off from the screen.
The end of the output looks like:
Detector: Norm_Mon_2_Flux_I=709023 Norm_Mon_2_Flux_ERR=5152.36 Norm_Mon_2_Flux_N=21731 "Norm_Mon_2_Flux"
Detector: SampleColl_up_Flux_Tile_I=709023 SampleColl_up_Flux_Tile_ERR=5152.36 SampleColl_up_Flux_Tile_N=21731 "SampleColl_up_Flux_Tile"
Detector: SampleColl_dn_Flux_Ap_I=53261.2 SampleColl_dn_Flux_Ap_ERR=1421.34 SampleColl_dn_Flux_Ap_N=1563 "SampleColl_dn_Flux_Ap"
Detector: Sample_Position_Flux_Tile_I=53261.2 Sample_Position_Flux_Tile_ERR=1421.34 Sample_Position_Flux_Tile_N=1563 "Sample_Position_Flux_Tile"
Detector: Sample_Position_Flux_Ap_I=45675.9 Sample_Position_Flux_Ap_ERR=1321.34 Sample_Position_Flux_Ap_N=1324 "Sample_Position_Flux_Ap"
Finally [SNAP: Z:\Sherline\Work\Experiments\ULT_DAC\IPTS-32577.1\McStas_SNAP\MyStuff\TestingForScans\StartWithThomass\SNAP_McStas3_5_20240613_153300/0]. Time: 7 [s]
INFO: Finish running step, get detectors
Traceback (most recent call last):
File "C:\mcstas-3.4\lib\tools\Python\mcrun\mcrun.py", line 562, in <module>
main()
File "C:\mcstas-3.4\lib\tools\Python\mcrun\mcrun.py", line 531, in main
scanner.run() # in optimisation.py
File "C:\mcstas-3.4\lib\tools\Python\mcrun\optimisation.py", line 259, in run
detectors = mcsimdetectors(current_dir)
File "C:\mcstas-3.4\lib\tools\Python\mcrun\optimisation.py", line 169, in mcsimdetectors
return [Detector(d['component'], *d['values'].split(), d['filename']) for d in blocks]
File "C:\mcstas-3.4\lib\tools\Python\mcrun\optimisation.py", line 169, in <listcomp>
return [Detector(d['component'], *d['values'].split(), d['filename']) for d in blocks]
KeyError: 'filename'
Sincerely,
Todd.
<image001.png>
From: Peter Kjær Willendrup <pkwi at dtu.dk<mailto:pkwi at dtu.dk>>
Sent: Thursday, June 13, 2024 3:12 PM
To: mcstas <mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>>
Cc: Sherline, Todd <sherlinete at ornl.gov<mailto:sherlinete at ornl.gov>>
Subject: [EXTERNAL] Re: [mcstas-users] Can' Scan McStas3 on Win11
Hi Todd
I believe we are no longer sensitive to the mention proxy issue, and this should have nothing to do with the issue you mention.
- And there should be no reason to reinstall anything if you are able to bring up the gui.
Can you elaborate a bit on how you are attempting to scan - and how it fails for you? (e.g. send me a screenshot)
To run a scan in mcgui:
- Bring up the “run dialogue”
- Supply the scan-range by adding e.g. 0,1 (no whitespace) in a parameter entry box
- Supply the wanted number of steps e.g. 11
To run a scan on the commandline
- use mcrun and supply parameter range and number of steps using e.g.
mcrun instrument.instr par1=0,1 -N11
Best,
Peter
Sherlinete at ornl.gov<http://ornl.gov/> wrote:
HI all,
I cannot perform parameter scans using my installation of McStas 3.4. I am running on a 64 bit Windows 10 Enterprise machine.
I noticed that there are specific installation instructions for the case when my machine is behind a proxy server. I am at the SNS, so I assume that is the case, but I did not follow those instructions when I installed the McStas 3.4 Metapackage. Could this be the reason I cannot run a scan? Other than the problem with scans, the installation seems to work fine. Should I try reinstalling it using the instructions specific to proxy servers?
Any other ideas why this problem may crop up?
Best,
Todd.
Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent
DTU Physics
<image002.gif>
Technical University of Denmark
<image003.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<mailto:pkwi at fysik.dtu.dk>
<Screenshot 2024-06-13 153819.jpg><a1G0AD-2-f5.dat><SNAP_McStas3_5.instr><SNAPguide_new_final_final>_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent
DTU Physics
[cid:42d6faea-2d48-40ed-83f7-52f8fef14230 at EURP192.PROD.OUTLOOK.COM]
Technical University of Denmark
[cid:465e6203-1a22-4bca-8ff3-aea658aae933 at EURP192.PROD.OUTLOOK.COM]
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/20240613/76d22d5c/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/20240613/76d22d5c/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/20240613/76d22d5c/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SNAP_McStas3_5.instr
Type: application/octet-stream
Size: 6374 bytes
Desc: SNAP_McStas3_5.instr
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20240613/76d22d5c/attachment-0001.obj>
More information about the mcstas-users
mailing list