fxihub / condor Goto Github PK
View Code? Open in Web Editor NEWCondor: a simulation tool for flash X-ray imaging
Home Page: http://lmb.icm.uu.se/condor
License: BSD 2-Clause "Simplified" License
Condor: a simulation tool for flash X-ray imaging
Home Page: http://lmb.icm.uu.se/condor
License: BSD 2-Clause "Simplified" License
When I try the example condor/examples/scripts/custom_map/example.py
I get:
$ python example.py
Simulating map
WARNING: File ./condor.cxi exists and is being overwritten
Traceback (most recent call last):
File "example.py", line 39, in <module>
res = E.propagate()
File "/Library/Python/2.7/site-packages/condor/utils/log.py", line 60, in st_func
r = func(*args, **keyArgs)
File "/Library/Python/2.7/site-packages/condor/experiment.py", line 168, in propagate
D_particles = self._get_next_particles()
File "/Library/Python/2.7/site-packages/condor/experiment.py", line 152, in _get_next_particles
D_particles["particle_%02i" % i] = p.get_next()
File "/Library/Python/2.7/site-packages/condor/particle/particle_map.py", line 204, in get_next
O = AbstractContinuousParticle.get_next(self)
File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 266, in get_next
O = AbstractParticle.get_next(self)
File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 97, in get_next
O["extrinsic_quaternion"] = self._get_next_extrinsic_rotation().get_as_quaternion()
File "/Library/Python/2.7/site-packages/condor/particle/particle_abstract.py", line 152, in _get_next_extrinsic_rotation
rotation = self._rotations.get_next_rotation()
File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 340, in get_next_rotation
self._rotations[0]._set_as_random_formalism(self._formalism)
File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 146, in _set_as_random_formalism
self.set_as_random()
File "/Library/Python/2.7/site-packages/condor/utils/rotation.py", line 158, in set_as_random
q = rand_quat()
Looks like rand_quat()
is not defined anywhere.
The speckle size when I simulate a ball is half the size of a cube of the same diameter. I suspect the code for the cube is buggy...
Alberto was trying to run a simulation with spsim and the following thing showed up problem in the slurm.out:
INFO:simulate:Simulation with spsim started. (PROGSTAT)
/home/www/condor/local/bin/spsim: error while loading shared libraries: libcudart.so.6.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/www/condor/diffractor/diffractor/simulate.py", line 119, in
conf = read_configuration_spsim("./spsim.confout")
File "/home/www/condor/diffractor/diffractor/simulate.py", line 19, in read_configuration_spsim
c = open(filename,"r")
IOError: [Errno 2] No such file or directory: './spsim.confout'
Looks like it couldn't find the CUDA libraries. Is the LD_LIBRARY_PATH correctly set?
Been following installation guides and get
AttributeError: module 'condor' has no attribute 'main'
when running examples.py
I'm suspecting this may be due to missing Python 3.9 support?
Since the spsim commit FXIhub/spsim@fc920d8#diff-573b39bd8d69627dd0431d425785abd0L200 columns 77-78 are parsed when searching for the atomic number in the PDB file. These columns don't exist in the example file DNA.pdb which causes the examples to be erratic.
A quick fix could be to use a complete PDB file instead. Even better would be to make spsim parse the atomic number in both cases (with and without the element columns 77-78), see FXIhub/spsim#8
The online version of condor is still running an old condor version, including its bugs such as #9.
Line 92 to Line 93:
TypeError: No loop matching the specified signature and casting was found for ufunc true_divide
The problem is that we can't divided using /=
on an Numpy-array.
The proposed fix is to replace the division by //=
:
Y //= factor
X //= factor
Result of renaming of get_atomic_masses
to get_atomic_standard_weights
I am a graduate student from China. I think condor is a very excellent scientific research tool. However, the online web version of condor is very unstable. It often cannot be opened or errors occur. I don't know if it's a problem with my network or a problem with the condor server.
The following configuration causes condor to segfault:
# Configuration file
# Automatically written by Configuration instance
[sample]
geometry=icosahedron
diameter=6.3e-08
number_of_orientations=1
material_type=protein
alignment=random
[source]
focus_diameter=1e-06
wavelength=2.06640320889e-10
pulse_energy=0.0096
[detector]
distance=0.1
noise=none
binning=1
nx=500
ny=500
output_phases=False
pixel_size=0.00022
Tried to run example.py
after installing condor as per documentation. Encountered
---------------------------------------------------------------------------------------------------
>>> Example 1/17: PARTICLE IDEAL SPHERE (configfile)
cd /var/home/keshav/phd/beamline/condor_simulations/condor/examples/configfile/particle_sphere; rm -f condor.cxi; condor
[start output]
Traceback (most recent call last):
File "/usr/local/bin/condor", line 33, in <module>
sys.exit(load_entry_point('condor==1.0.7', 'console_scripts', 'condor')())
File "/usr/local/bin/condor", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib64/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/local/lib64/python3.9/site-packages/condor/__init__.py", line 33, in <module>
from .experiment import Experiment
File "/usr/local/lib64/python3.9/site-packages/condor/experiment.py", line 53, in <module>
import condor.utils.nfft
ImportError: libnfft3.so.1: cannot open shared object file: No such file or directory
[end output]
Traceback (most recent call last):
File "/var/home/keshav/phd/beamline/condor_simulations/condor/examples.py", line 147, in <module>
run_examples()
File "/var/home/keshav/phd/beamline/condor_simulations/condor/examples.py", line 133, in run_examples
raise Exception(">>> Example %i (%s) failed. Abort." % (i+1,e["name"]))
Exception: >>> Example 1 (PARTICLE IDEAL SPHERE (configfile)) failed. Abort.
It failed to open libnfft3.so.1
, but NFFT
is installed at /usr/local/lib/libnfft3.so.1
.
$ locate libnfft
/usr/local/lib/libnfft3.a
/usr/local/lib/libnfft3.la
/usr/local/lib/libnfft3.so
/usr/local/lib/libnfft3.so.1
/usr/local/lib/libnfft3.so.1.0.0
When I use the web page to run a simulation of a 50 nm gold ball at 6 keV I get 0 photons. If I change the material to water I get 5000 photons. Something is fishy...
Missing polarisation correction in the simulations. Compare with dragonfly
Hi,
Comparing the resulting signal from the same molecule using two different methods, particleAtoms and particleMap, I do not get the same value for q=0 (If I don't scale with a factor). The input for particleAtoms is a PDB-file. Using the same PDB-file, I have with DFT calculated the electron density on a grid, and made it an input to Condor. All files to run on the cluster is attached.
In [1]: import condor File "/Users/filipe/Library/Python/2.7/lib/python/site-packages/condor/task.py", line 55 def __init__(self, name : str, wdir : str, args : dict, using_pipe : bool = False): ^ SyntaxError: invalid syntax
Can I use condor on windows system?I tried but failed.
There is a misspelled variable name in condor/particle/particle_sphere.py
On line 103 an L is missing:
def get_conf(sef):
rather than
def get_conf(self):
I have installed the condor successfully according to the docs. But when I python example.py, the error occurs.
>>> Example 4/17: PARTICLE ATOMS (configfile)
cd /home/yxli/air/condor/examples/configfile/particle_atoms; rm -f condor.cxi; condor
[start output]
dynamic module does not define module export function (PyInit__spsim_pybackend)
ERROR: Cannot import spsim module. This module is necessary to simulate diffraction for particle model of discrete atoms. Please install spsim from https://github.com/FilipeMaia/spsim and try again.
Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/spsim_pybackend.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit__spsim_pybackend)
I tried to reinstall the spsim, but it still did not work. Spsim module can not be imported, and I don not know how to deal with it.
Solid angle differs from dragonfly
Under condor/examples/scripts/diffraction_3d/example.py, this code works flawlessly in plotting the real space object when using condor.ParticleMap for a sphere or icosahedron, but when I use condor.ParticleAtoms in order to use a PDB, I get the following error:
RuntimeError: Cache empty!
This occurs on line 22:
E.get_qmap_from_cache()
Since NFFT 3.3, the keyword argument nfft_flags
of the fft_plan
module has been renamed to flags
. This creates a problem in the following file
condor/src/utils/nfft/nfftmodule.c
Lines 69 to 72 in 150f680
I tried to fix this by checking for the NFFT version, but I didn't find any working solution so far...
On lines 324 and 351 in particle_map.py, there is a call to perproc_map_manual
Should that be preproc_map_manual ? Looks like it should offset a map and multiply by a factor, but I don't know if it's even used.
When trying to create a conda package I get the following error:
Traceback (most recent call last):
File "pickle_tables.py", line 107, in <module>
pickle_atomic_standard_weights_and_numbers(here + "/sw", here)
File "pickle_tables.py", line 63, in pickle_atomic_standard_weights_and_numbers
lines = f.readlines()
File "/Users/filipe/miniconda3/conda-bld/condor_1527942418754/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 156: ordinal not in range(128)
I think using codes.open()
instead of simply open()
before the readlines()
will probably fix it.
Like for example condor segfaults.
It should try to provide some feedback to the user.
Your additional
check_plan
seems to reveal that nfft does not support odd number of pixels in any dimension.
Yes, you're right. Unfortunately the documentation doesn't tell that. But it's clear from the nfft sources.
Originally posted by @lozhnikov in #21 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.