jacobjma / pyqstem Goto Github PK
View Code? Open in Web Editor NEWA Python interface to the electron microscopy simulation program QSTEM
License: GNU General Public License v3.0
A Python interface to the electron microscopy simulation program QSTEM
License: GNU General Public License v3.0
Dear PyQSTEM developers,
I wonder if there is a more detailed doc for pyqstem, for I don't know what the parameter names and meanings of the functions. For example, I am interested in diffration simulations but the notebooks I found are mainly about STEM or TEM image simulation.
Thanks and regards.
Hi,
Trying to Install PyQSTEM on Windows 7.
I'm getting the error message 'no module named Cython.' I've followed the installation instructions and can import cython while using python otherwise.
Any suggestions or advice would be helpful
regards
Hi Jacob,
PyQSTEM sometimes crashes when you reuse the same object with a different number of slices. Using a new pyqstem object in each iteration instead leads to a memory leak.
The attached script shows the problem. On a Mac, it gives the error
Corrupt value: 0x3f0278d13f0278d1
Python(6133,0x1136c5dc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
On linux, it just gives a Segmentation fault (core dumped)
. It is not 100% reproducible, the attached script crashes every second time or so.
Hi,
I am having an installation problem, would you be able to provide any advice?
I'm running Python 3.6+ (conda), on MacOS 10.13.4
pyqstem/qstem_interface.cpp:582:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^~~~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
Cheers!
Super tiny thing which I was able to fix immediately, but I thought I'd report it anyway. I tried running your very old exit wave reconstruction example, which uses the CTF radial_plot
function. Trying to call this function throws an error because spline
is no longer part of scipy.interpolate
. Looking below in the code, it doesn't look like spline
is used anyway. Removing it makes radial_plot
work again.
@jacobjma Is this still being developed?
I'm trying to use this a bit and could be interested in making it available via pyxem (https://github.com/pyxem/pyxem), but this would need things like writing docstrings for functions. I might also be able to write those - so just thought I'd check what the status of this project now is?
`C:\Users\yisong\anaconda3\envs\qstem\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pywt_extensions_pywt.c(12552): error C2440: '=': cannot convert from 'PyObject *' to 'double'
pywt_extensions_pywt.c(12555): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
pywt_extensions_pywt.c(12566): error C2440: '=': cannot convert from 'PyObject *' to 'double'
pywt_extensions_pywt.c(12569): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
pywt_extensions_pywt.c(12663): error C2440: '=': cannot convert from 'PyObject *' to 'double'
pywt_extensions_pywt.c(12677): error C2440: '=': cannot convert from 'PyObject *' to 'double'
pywt_extensions_pywt.c(12680): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
pywt_extensions_pywt.c(12691): error C2440: '=': cannot convert from 'PyObject *' to 'double'
pywt_extensions_pywt.c(12694): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
error: Setup script exited with error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe' failed with exit code 2`
I got problem with the cl.exe file when running "python setup.exe install". I installed Visual Studio 2022 build tools and in an Anaconda vitual environment with Python 3.6. I can see there is a cl.exe file in the same folder. So it shouldn't be a path problem? Could anyone help? Thanks very much.
Hi, I read in your paper that the model is able to output the heights of the atomic columns, but when I try to load an image and run it through the CNN, the only output is the confidence map. The code for the calculation of the column heights has already been implemented? If so, how can I see the heights ?
Thanks.
Dear PyQSTEM developers,
I'm trying pyqstem on Ubuntu 20.04.1 LTS (Focal Fossa) and python3.8.2.
I faced segmentation fault in this condition at the line of qstem.build_potential, although it went well on windows.
Code is shown as below;
from future import print_function
import numpy as np
import matplotlib.pyplot as plt
from pyqstem import PyQSTEM
from pyqstem.util import atoms_plot
import ase
from ase.build import nanotube
from pyqstem.imaging import CTF
atoms = nanotube(13,7,length=2, verbose=True)
atoms.wrap()
#Figure
atoms.center(vacuum=2,axis=2)
fig,(ax1,ax2)=plt.subplots(1,2,figsize=(8,4))
atoms_plot(atoms,direction=2,ax=ax1)
atoms_plot(atoms,direction=1,ax=ax2)
qstem = PyQSTEM('TEM')
qstem.set_atoms(atoms)
v0=80
qstem.build_wave('plane',v0,(100,100))
wave=qstem.get_wave()
#wave.view()
#plt.show()
qstem.build_potential(5) #segmentation fault (core dumped)
potential = qstem.get_potential_or_transfunc()
potential.view(method='real')
plt.show()
qstem.run()
wave = qstem.get_wave()
ctf = CTF(defocus=-60, Cs = 0.005, focal_spread = 30)
image_wave=wave.apply_ctf(ctf)
image_wave.view()
plt.show()
Thanks and regards.
after i excuted “python setup.py install”
LINK : fatal error LNK1181: cannot open input file 'fftw3.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1181
i don't know how to deal with this problem...
Hi,
I was trying to install PyQSTEM on Mac OS X 10.12.6. As per the instructions, everything was installed correctly with few warnings but when trying to import pyqstem, I get the following error -
Python 3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, 13:19:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from pyqstem import PyQSTEM
Traceback (most recent call last):
File "", line 1, in
File "/Users/cphatak/Applications/PyQSTEM/pyqstem/init.py", line 2, in
from pyqstem.qstem_interface import PyQSTEM
ModuleNotFoundError: No module named 'pyqstem.qstem_interface'
Any help appreciated. Thanks,
cheers,
-cd
I used Anaconda to install pyqstem in the following step:
create an env named qstem
activate the above env, install dependencies:
conda install numpy matplolib scipy jupyter cython scikit-image
conda install -c conda-forge ase
cd to pyqstem
folder downloaded, install using
python setup.py install
After all these steps, I open jupyter notebooks to run the examples provided. failed with error msg
DLL load failed: The specified module could not be found.
I checked the folder where pyqstem is installed, qstem_interface.cp36-win_amd64.pyd
has been generated by the compiler, is this file the dll file needed?
Any solution to this?
BTW: I successfully installed on MacOX, but I came across this problem in Windows platform...
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.