mirror of https://github.com/silx-kit/pyFAI.git
Merge remote-tracking branch 'upstream/master' into 0.18
This commit is contained in:
commit
6bf390b800
72
README.rst
72
README.rst
|
@ -122,15 +122,15 @@ Python 2.7, 3.4, 3.5, 3.6 and 3.7 are well tested.
|
|||
Python 2.6, 3.2 and 3.3 are no more supported since pyFAI 0.12
|
||||
For full functionality of pyFAI the following modules need to be installed.
|
||||
|
||||
* numpy - http://www.numpy.org
|
||||
* scipy - http://www.scipy.org
|
||||
* matplotlib - http://matplotlib.sourceforge.net/
|
||||
* fabio - http://sourceforge.net/projects/fable/files/fabio/
|
||||
* h5py - http://www.h5py.org/
|
||||
* pyopencl - http://mathema.tician.de/software/pyopencl/
|
||||
* python-pyqt5 - http://www.riverbankcomputing.co.uk/software/pyqt/intro
|
||||
* silx - http://www.silx.org
|
||||
* numexpr - https://github.com/pydata/numexpr
|
||||
* `numpy` - http://www.numpy.org
|
||||
* `scipy` - http://www.scipy.org
|
||||
* `matplotlib` - http://matplotlib.sourceforge.net/
|
||||
* `fabio` - http://sourceforge.net/projects/fable/files/fabio/
|
||||
* `h5py` - http://www.h5py.org/
|
||||
* `pyopencl` - http://mathema.tician.de/software/pyopencl/
|
||||
* `python-pyqt5` - http://www.riverbankcomputing.co.uk/software/pyqt/intro
|
||||
* `silx` - http://www.silx.org
|
||||
* `numexpr` - https://github.com/pydata/numexpr
|
||||
|
||||
Those dependencies can simply be installed by::
|
||||
|
||||
|
@ -149,15 +149,15 @@ or using apt-get on from the command line in a terminal::
|
|||
|
||||
The extra Ubuntu packages needed are:
|
||||
|
||||
* python-numpy
|
||||
* python-scipy
|
||||
* python-matplotlib
|
||||
* python-dev
|
||||
* python-fabio
|
||||
* python-pyopencl
|
||||
* python-pyqt5
|
||||
* python-silx
|
||||
* python-numexpr
|
||||
* `python-numpy`
|
||||
* `python-scipy`
|
||||
* `python-matplotlib`
|
||||
* `python-dev`
|
||||
* `python-fabio`
|
||||
* `python-pyopencl`
|
||||
* `python-pyqt5`
|
||||
* `python-silx`
|
||||
* `python-numexpr`
|
||||
|
||||
and the same with python3
|
||||
using apt-get these can be installed as::
|
||||
|
@ -203,32 +203,32 @@ One needs to subscribe by sending an email to sympa@esrf.fr with a subject "subs
|
|||
Maintainers
|
||||
-----------
|
||||
|
||||
* Jérôme Kieffer (ESRF)
|
||||
* Valentin Valls (ESRF)
|
||||
* Jérôme Kieffer (ESRF)
|
||||
* Valentin Valls (ESRF)
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Frédéric-Emmanuel Picca (Soleil)
|
||||
* Thomas Vincent (ESRF)
|
||||
* Dimitris Karkoulis (ESRF)
|
||||
* Aurore Deschildre (ESRF)
|
||||
* Giannis Ashiotis (ESRF)
|
||||
* Zubair Nawaz (Sesame)
|
||||
* Jon Wright (ESRF)
|
||||
* Amund Hov (ESRF)
|
||||
* Dodogerstlin @github
|
||||
* Gunthard Benecke (Desy)
|
||||
* Gero Flucke (Desy)
|
||||
* Frédéric-Emmanuel Picca (Soleil)
|
||||
* Thomas Vincent (ESRF)
|
||||
* Dimitris Karkoulis (ESRF)
|
||||
* Aurore Deschildre (ESRF)
|
||||
* Giannis Ashiotis (ESRF)
|
||||
* Zubair Nawaz (Sesame)
|
||||
* Jon Wright (ESRF)
|
||||
* Amund Hov (ESRF)
|
||||
* Dodogerstlin @github
|
||||
* Gunthard Benecke (Desy)
|
||||
* Gero Flucke (Desy)
|
||||
|
||||
Indirect contributors (ideas...)
|
||||
--------------------------------
|
||||
|
||||
* Peter Boesecke
|
||||
* Manuel Sánchez del Río
|
||||
* Vicente Armando Solé
|
||||
* Brian Pauw
|
||||
* Veijo Honkimaki
|
||||
* Peter Boesecke
|
||||
* Manuel Sánchez del Río
|
||||
* Vicente Armando Solé
|
||||
* Brian Pauw
|
||||
* Veijo Honkimaki
|
||||
|
||||
.. |Build Status| image:: https://travis-ci.org/silx-kit/pyFAI.svg?branch=master
|
||||
:target: https://travis-ci.org/silx-kit/pyFAI
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
"- [LogScale](../doc/source/usage/tutorial/LogScale/Guinier.ipynb)\n",
|
||||
"- [MakeCalibrant](../doc/source/usage/tutorial/MakeCalibrant/make_calibrant.ipynb)\n",
|
||||
"- [MultiGeometry](../doc/source/usage/tutorial/MultiGeometry/MultiGeometry.ipynb)\n",
|
||||
"- [Ellipse](../doc/source/usage/tutorial/Ellipse/ellipse.ipynb)\n",
|
||||
"- Soleil:\n",
|
||||
"\n",
|
||||
" - [Cristal_Mythen](../doc/source/usage/tutorial/Soleil/Cristal_Mythen.ipynb)\n",
|
||||
|
|
|
@ -35,7 +35,7 @@ __author__ = "Jérôme Kieffer"
|
|||
__contact__ = "Jerome.Kieffer@ESRF.eu"
|
||||
__license__ = "MIT"
|
||||
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
|
||||
__date__ = "01/03/2019"
|
||||
__date__ = "16/05/2019"
|
||||
__status__ = "stable"
|
||||
|
||||
|
||||
|
@ -1111,13 +1111,15 @@ class NexusDetector(Detector):
|
|||
setattr(cloned, name, value)
|
||||
return cloned
|
||||
|
||||
def __deepcopy__(self):
|
||||
def __deepcopy__(self, memo=None):
|
||||
import copy
|
||||
cloned = self.__class__()
|
||||
if memo is not None:
|
||||
memo[id(self)] = cloned
|
||||
for name in self._ATTRIBUTES_TO_CLONE:
|
||||
if hasattr(self, name):
|
||||
value = getattr(self, name)
|
||||
value = copy.deepcopy(value)
|
||||
value = copy.deepcopy(value, memo)
|
||||
setattr(cloned, name, value)
|
||||
return cloned
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ from __future__ import absolute_import
|
|||
|
||||
__authors__ = ["V. Valls"]
|
||||
__license__ = "MIT"
|
||||
__date__ = "03/01/2019"
|
||||
__date__ = "14/05/2019"
|
||||
|
||||
import logging
|
||||
import functools
|
||||
|
@ -91,9 +91,10 @@ class MarkerManager(object):
|
|||
_logger.debug("Backtrace", exc_info=True)
|
||||
self.__directDist = None
|
||||
|
||||
invertGeometry = InvertGeometry(
|
||||
self.__geometry.array_from_unit(typ="center", unit=pyFAI.units.TTH_RAD, scale=False),
|
||||
self.__geometry.chiArray())
|
||||
if geometry is not None:
|
||||
invertGeometry = InvertGeometry(
|
||||
geometry.array_from_unit(typ="center", unit=pyFAI.units.TTH_RAD, scale=False),
|
||||
geometry.chiArray())
|
||||
|
||||
self.__markerModel.lockSignals()
|
||||
for marker in self.__markerModel:
|
||||
|
@ -102,12 +103,12 @@ class MarkerManager(object):
|
|||
|
||||
chiRad, tthRad = marker.physicalPosition()
|
||||
pixel = None
|
||||
if self.__geometry is not None:
|
||||
if geometry is not None:
|
||||
pixel = invertGeometry(tthRad, chiRad, True)
|
||||
|
||||
ax, ay = numpy.array([pixel[1]]), numpy.array([pixel[0]])
|
||||
tth = self.__geometry.tth(ay, ax)[0]
|
||||
chi = self.__geometry.chi(ay, ax)[0]
|
||||
tth = geometry.tth(ay, ax)[0]
|
||||
chi = geometry.chi(ay, ax)[0]
|
||||
|
||||
error = numpy.sqrt((tthRad - tth) ** 2 + (chiRad - chi) ** 2)
|
||||
if error > 0.05:
|
||||
|
|
|
@ -115,9 +115,9 @@ class CalibrationState(qt.QObject):
|
|||
|
||||
def __init__(self, parent):
|
||||
qt.QObject.__init__(self, parent)
|
||||
self.__reset()
|
||||
self.reset()
|
||||
|
||||
def __reset(self):
|
||||
def reset(self):
|
||||
self.__geoRef = None
|
||||
self.__geometry = None
|
||||
self.__rings = None
|
||||
|
@ -157,7 +157,7 @@ class CalibrationState(qt.QObject):
|
|||
"""Invalidate the object and remove the ownershit of the geometry
|
||||
refinment"""
|
||||
geoRef = self.__geoRef
|
||||
self.__reset()
|
||||
self.reset()
|
||||
return geoRef
|
||||
|
||||
def update(self, calibration):
|
||||
|
@ -909,15 +909,19 @@ class GeometryTask(AbstractCalibrationTask):
|
|||
def __geometryUpdated(self):
|
||||
calibration = self.__getCalibration()
|
||||
if calibration is None:
|
||||
self.__calibrationState.reset()
|
||||
return
|
||||
if not calibration.isValid():
|
||||
self.__showDialogCalibrationDiverge()
|
||||
self.__calibrationState.reset()
|
||||
return
|
||||
geometry = self.model().fittedGeometry()
|
||||
if geometry.isValid():
|
||||
resetResidual = self.__fitting is not True
|
||||
calibration.fromGeometryModel(geometry, resetResidual=resetResidual)
|
||||
self.__calibrationState.update(calibration)
|
||||
else:
|
||||
self.__calibrationState.reset()
|
||||
|
||||
geoRef = calibration.getPyfaiGeometry()
|
||||
self.__plot.markerManager().updatePhysicalMarkerPixels(geoRef)
|
||||
|
|
|
@ -27,7 +27,7 @@ from __future__ import absolute_import
|
|||
|
||||
__authors__ = ["V. Valls"]
|
||||
__license__ = "MIT"
|
||||
__date__ = "07/05/2019"
|
||||
__date__ = "15/05/2019"
|
||||
|
||||
import logging
|
||||
import numpy
|
||||
|
@ -378,19 +378,31 @@ class _PeakPickingPlot(silx.gui.plot.PlotWidget):
|
|||
if hasattr(self, "centralWidget"):
|
||||
self.centralWidget().installEventFilter(self)
|
||||
|
||||
def setInteractiveMode(self, mode, color='black',
|
||||
shape='polygon', label=None,
|
||||
zoomOnWheel=True, source=None, width=None):
|
||||
"""Override the function to allow to disable extrat interaction modes.
|
||||
"""
|
||||
self.setPeakInteractiveMode(self.PEAK_SELECTION_MODE)
|
||||
silx.gui.plot.PlotWidget.setInteractiveMode(self, mode, color=color, shape=shape, label=label, zoomOnWheel=zoomOnWheel, source=source, width=width)
|
||||
|
||||
def peakInteractiveMode(self):
|
||||
"""Returns the peak interactive mode selected."""
|
||||
return self.__mode
|
||||
|
||||
def setPeakInteractiveMode(self, mode):
|
||||
if self.__mode == mode:
|
||||
return
|
||||
self.__mode = mode
|
||||
|
||||
if mode == self.PEAK_SELECTION_MODE:
|
||||
self.setInteractiveMode('zoom')
|
||||
super(_PeakPickingPlot, self).setInteractiveMode('zoom')
|
||||
elif mode == self.ERASOR_MODE:
|
||||
color = "black"
|
||||
self.setInteractiveMode('draw', shape='rectangle', source=self, color=color)
|
||||
super(_PeakPickingPlot, self).setInteractiveMode('draw', shape='rectangle', source=self, color=color)
|
||||
elif mode == self.BRUSH_MODE:
|
||||
color = "black"
|
||||
self.setInteractiveMode('draw', shape='rectangle', source=self, color=color)
|
||||
super(_PeakPickingPlot, self).setInteractiveMode('draw', shape='rectangle', source=self, color=color)
|
||||
else:
|
||||
assert(False)
|
||||
|
||||
|
@ -1077,8 +1089,6 @@ class PeakPickingTask(AbstractCalibrationTask):
|
|||
self.addAction(action)
|
||||
|
||||
def __onPlotModeChanged(self, owner):
|
||||
if owner is None:
|
||||
return
|
||||
# TODO: This condition should not be reached like that
|
||||
if owner is not self.__plot:
|
||||
# Here a default plot tool is triggered
|
||||
|
|
Loading…
Reference in New Issue