Comments (6)
Hi,
Thank you for reporting the error! And sorry for the bug, we don't use this backend and haven't tested it for a long time.
I've fixed the bug, please get the new version of plotter.py or of the whole xrt and give it a try.
from xrt.
I am sorry to disturbe you again about the problem in operating xrt with shadow. It is important to me.
When I operate the code in the Page https://xrt.readthedocs.io/shadow.html#scriptingshadow
import xrt.runner as xrtr
import xrt.plotter as xrtp
plot1 = xrtp.XYCPlot('star.01')
xrtr.run_ray_tracing(plot1, repeats=40, updateEvery=2, threads=1)
there will be something wrong
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\anaconda\envs\py37\lib\tkinter\__init__.py", line 1702, in __call__
return self.func(*args)
File "D:\anaconda\envs\py37\lib\tkinter\__init__.py", line 746, in callit
func(*args)
File "D:\anaconda\envs\py37\lib\site-packages\matplotlib\backends\_backend_tk.py", line 118, in _on_timer
TimerBase._on_timer(self)
File "D:\anaconda\envs\py37\lib\site-packages\matplotlib\backend_bases.py", line 1194, in _on_timer
ret = func(*args, **kwargs)
File "D:\anaconda\envs\py37\lib\site-packages\xrt\plotter.py", line 1097, in timer_callback
runner.dispatch_jobs()
File "D:\anaconda\envs\py37\lib\site-packages\xrt\runner.py", line 181, in dispatch_jobs
one_iteration()
File "D:\anaconda\envs\py37\lib\site-packages\xrt\runner.py", line 211, in one_iteration
bl.forceAlign = False
AttributeError: 'NoneType' object has no attribute 'forceAlign'
If I operate the code '00_simple.py'in the github https://github.com/kklmn/xrt/tree/master/examples/withShadow/00_02
# -*- coding: utf-8 -*-
"""The simplest example of using shadow with xrt."""
__author__ = "Konstantin Klementiev"
__date__ = "1 Mar 2012"
import sys
sys.path.append(r"c:\Alba\Ray-tracing\with Python")
import xrt.runner as xrtr
import xrt.plotter as xrtp
plot1 = xrtp.XYCPlot('star.01')
plot1.caxis.fwhmFormatStr = None
xrtr.run_ray_tracing(plot1, repeats=40, updateEvery=2, backend='shadow')
there is also something wrong about the program,and always print the massege "('not readable',) , ignored..."
I don't understand where is the problem is. But using the backend of shadow is very important to accomplish my experiment. please help me.
I wish to hear from you again
from xrt.
Hi,
I've now fixed the Shadow backend (please download from GitHub) and checked it with the example ...\examples\withShadow\00_02\00_simple.py
.
I ran it with Shadow 2.3, and I've never tried a newer version. It can be that newer versions do not produce bat files anymore. Then you have to create shadow-source.bat and shadowvui.bat yourself.
The 'not readable' error may still appear from time to time due to concurrent file reading-writing.
If every iteration results in this error then Shadow doesn't produce the expected resulting files. In this case, run shadow-source.bat and shadowvui.bat from the command shell and explore the output.
from xrt.
Thanks a lot that you solve the problem of backend. I think the application you develop is very good, but I wanna use it to handle the data from Shadow3, and translate the data into the picture to absorve the beam like xrtglow'picture. How should I do?
from xrt.
To use Shadow3 in xrt would mean a new backend. Since none of us needs it, we are not going to develop it.
Only if you (or another interested person) can provide a proper readout function, similar to
xrt.backends.shadow.get_output(), I can look at connecting Shadow3 to xrt.
from xrt.
OK, thank you for your help.
from xrt.
Related Issues (20)
- how 头
- parabolic mirror HOT 3
- laterally graded thicknesses HOT 16
- How to set up a spherical mirror HOT 3
- Example for distorted surfaces HOT 2
- how to set the divergence of the source HOT 3
- Problem with run_ray_tracing HOT 24
- a bug about xrtqook HOT 5
- Python created from XRTGlow show different results HOT 6
- simulation of VLS HOT 6
- build spherical mirror from elliptical optic HOT 4
- simulation of Hyperboloid mirror HOT 3
- Question about plotting energy spectrum HOT 6
- How to change the screen size or resolution when viewing a small focus image? HOT 2
- problem with xrtBentXtal in Laue geometry HOT 5
- plot error with matplotlib 3.8.2 HOT 6
- ParabolicalMirrorParam optics with figure error HOT 3
- Some doubts about custom faceted lenses HOT 4
- xyz_to_param and param_to_xyz for class ParabolicalMirrorParam HOT 2
- How to simulate nested shells HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrt.