agabrown / astrometry-inference-tutorials Goto Github PK
View Code? Open in Web Editor NEWTutorials on the use of (Gaia) astrometry in astronomical data analysis or inference problems.
License: Other
Tutorials on the use of (Gaia) astrometry in astronomical data analysis or inference problems.
License: Other
Hi everyone,
I'm trying to use your Distance Estimator interface, I executed "python3.6 DistanceEstimatorApplication.py" in a terminal, and I got the following error:
Traceback (most recent call last):
File "DistanceEstimatorApplication.py", line 13, in
from PIL import ImageTk, Image
ModuleNotFoundError: No module named 'PIL'
I would appreciate if you can help me to solve this problem.
In DistanceEstimatorApplication.py you import NavigationToolbar2TkAgg but this is no longer available in matplotlib - the current name is NavigationToolbar2Tk. I use the following:
try:
# NavigationToolbar2TkAgg was deprecated in matplotlib 2.2 and is no
# longer present in v3.0 - so a version test would also be possible.
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
except ImportError:
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
except:
raise
This is also regarding DistanceEstimatorApplication.py - when showing the PDFs it calls plot_image which uses the show() option to FigureCanvasTkAgg - this is no longer (not sure which matplotlib version) supported and .draw should be used instead. I use:
if hasattr(dataPlot, 'show'):
# Deprecated version
dataPlot.show()
elif hasattr(dataPlot, 'draw'):
dataPlot.draw()
else:
# Maybe print a warning?
return
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.