Skip to content

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
CPrescher committed Mar 5, 2019
2 parents 3b4a03a + 9066004 commit 6ae6e36
Show file tree
Hide file tree
Showing 150 changed files with 4,625 additions and 2,013 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -18,6 +18,7 @@ cloc-1.62.pl
*.so.dSYM
*.ui.autosave
*.coverage
smooth_bruckner_cython.c

log.txt
.idea
Expand All @@ -28,6 +29,8 @@ _build/
_version.py
install.sh
analysis
.pytest_cache
libsmooth_b*

# Build results

Expand Down Expand Up @@ -178,4 +181,4 @@ $RECYCLE.BIN/
# Mac desktop service store files
.DS_Store

\.vscode/
.vscode/
37 changes: 6 additions & 31 deletions .travis.yml
Expand Up @@ -5,38 +5,14 @@ language: python
sudo: required

python:
- 2.7
- 3.6

before_install:
- echo $TRAVIS_PYTHON_VERSION
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
if [ ! -d "/home/travis/miniconda2/bin" ]; then
rm -rf /home/travis/miniconda2;
wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
chmod +x miniconda.sh;
./miniconda.sh -b;
fi
fi
- if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then
if [ ! -d "/home/travis/miniconda3/bin" ]; then
rm -rf /home/travis/miniconda3;
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
chmod +x miniconda.sh;
./miniconda.sh -b;
fi
fi

- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
export PATH=/home/travis/miniconda2/bin:$PATH;
else
export PATH=/home/travis/miniconda3/bin:$PATH;
fi

- if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then
conda install --yes python=3.6;
fi

- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda install --yes python=3.6;
- conda update --yes conda
- export PYTHONPATH=$PWD/dioptas:$PYTHONPATH

Expand All @@ -51,8 +27,7 @@ addons:
- libgfortran3

install:
- conda install --yes numpy pillow pycifrw scipy pandas matplotlib python-dateutil nose h5py pyqt scikit-image cython future qtpy pyfai fabio lmfit mock pytest pytest-cov -c conda-forge
- conda install --yes pyqtgraph -c cprescher
- conda install --yes pycifrw pandas python-dateutil h5py scikit-image future qtpy pyfai lmfit mock pytest pytest-cov pyqtgraph -c cprescher
- pip install pyepics

- cd dioptas/model/util/
Expand Down
46 changes: 41 additions & 5 deletions Dioptas.spec
@@ -1,7 +1,9 @@
# -*- coding: utf8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray data
# Copyright (C) 2017 Clemens Prescher (clemens.prescher@gmail.com)
# Institute for Geology and Mineralogy, University of Cologne
# -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
# Copyright (C) 2019 DESY, Hamburg, Germany
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -47,12 +49,46 @@ extra_datas = [

binaries = []

fabio_hiddenimports = [
"fabio.edfimage",
"fabio.adscimage",
"fabio.tifimage",
"fabio.marccdimage",
"fabio.mar345image",
"fabio.fit2dmaskimage",
"fabio.brukerimage",
"fabio.bruker100image",
"fabio.pnmimage",
"fabio.GEimage",
"fabio.OXDimage",
"fabio.dm3image",
"fabio.HiPiCimage",
"fabio.pilatusimage",
"fabio.fit2dspreadsheetimage",
"fabio.kcdimage",
"fabio.cbfimage",
"fabio.xsdimage",
"fabio.binaryimage",
"fabio.pixiimage",
"fabio.raxisimage",
"fabio.numpyimage",
"fabio.eigerimage",
"fabio.hdf5image",
"fabio.fit2dimage",
"fabio.speimage",
"fabio.jpegimage",
"fabio.jpeg2kimage",
"fabio.mpaimage",
"fabio.mrcimage"
]

a = Analysis(['Dioptas.py'],
pathex=[folder],
binaries=binaries,
datas=extra_datas,
hiddenimports=['scipy.special._ufuncs_cxx', 'scipy._lib.messagestream', 'skimage._shared.geometry',
'h5py.defs', 'h5py.utils', 'h5py.h5ac', 'h5py', 'h5py._proxy'],
'h5py.defs', 'h5py.utils', 'h5py.h5ac', 'h5py', 'h5py._proxy', 'pywt._extensions._cwt'] +
fabio_hiddenimports,
hookspath=[],
runtime_hooks=[],
excludes=['PyQt4', 'PySide'],
Expand Down
26 changes: 14 additions & 12 deletions README.md
Expand Up @@ -11,7 +11,7 @@ Clemens Prescher (clemens.prescher@gmail.com)

Requirements
------------
* python 2.7/3.5
* python 3.4-3.7
* qtpy with PyQt5/PyQt4/PySide
* numpy
* scipy
Expand All @@ -37,9 +37,7 @@ Installation

Executable versions for Windows, Mac OsX and Linux (all 64bit) can be downloaded from:

[https://uni-koeln.sciebo.de/index.php/s/rS4RkVjU6guQeRP](https://uni-koeln.sciebo.de/index.php/s/rS4RkVjU6guQeRP)
or
[http://millenia.cars.aps.anl.gov/gsecars/data/Dioptas/](http://millenia.cars.aps.anl.gov/gsecars/data/Dioptas/)
https://github.com/Dioptas/Dioptas/releases

The executable versions are self-contained folders, which do not need any python installation.

Expand All @@ -48,21 +46,25 @@ The executable versions are self-contained folders, which do not need any python
In order to make changes to the source code yourself or always get the latest development versions you need to install
the required python packages on your machine.

The easiest way to install the all the dependencies for Dioptas is to use the Anaconda 64bit Python 3 distribution.
Please download it from https://www.continuum.io/downloads. After having the added the scripts to you path (or use the
The easiest way to install the all the dependencies for Dioptas is to use the Anaconda (or miniconda) 64bit Python 3 distribution.
Please download it from https://www.continuum.io/downloads. After the installer added the scripts to your path (or use the
Anaconda prompt on windows) please run the following commands on the commandline:

```bash
conda install --yes python=3.5 numpy pillow pycifrw scipy pandas matplotlib python-dateutil nose h5py pyqt scikit-image cython future qtpy fabio lmfit mock -c conda-forge
conda install --yes pyqtgraph pyfai -c cprescher
pip install pyepics
conda install --yes dioptas pyfai -c cprescher
```

and then run Dioptas by typing:
```bash
dioptas
```
in the commandline.


Running the Program
------------------
Running the Program from source
-------------------------------

You can start the program by running the Dioptas.py script in the dioptas folder by:
You can start the program by running the Dioptas.py script in the dioptas folder:

```bash
python Dioptas.py
Expand Down
31 changes: 31 additions & 0 deletions changelog.rst
@@ -1,3 +1,34 @@
0.5.0 (stable 03/05/2019)
-------------------------

New features:
- Added the capability of using detector distortion correction defined by spline files generated from Fit2D (please
see the calibration parameters)
- PONI and rotation parameters can now be fixed during the calibration
- redesigned parts of the GUI: (1) the top controls in the Integration view no adapt to the used width, and split
into two groups to make use of the space. (2) Overlay and Phase Control Widgets now are mainly controlled by
buttons and the important parameter can be changed for each item individually in the table. (3) There is now a
a different view mode for the integration view, where image and integrated pattern are shown on the left, and all
control panels are on the right. This can be activated by using the change view button on the lower left.
- the cBN Seat Correction and Detector Incidence Absoprtion Correction Controls have been redesigned
- Added the option to use a transfer correction for image intensities. Please see the Cor tab in the integration
view
- azimuthal bins and azimuthal range for the cake integration can now be adjusted manually in the X tab
- the cake image can now be exported (press the save button below the image)
- auto-extracted Pattern background can now be saved as file or later reused as overlay
- the background subtraction algorithm is now also rewritten in cython, which should make deployment easier
- a button was added to undo the last peak selection in the calibration tab
- the jcpds editor now also shows q-values for each line

Bug fixes:
- cosmic removal in the mask panel is now working again
- changing the radial bins in the X tab in the integration view works now correctly again
- phases with trigonal symmetry should now work correctly
- saved background range should now correctly restore after restarting Dioptas
- browsing files works now correctly from 10 to 9 without leading zeros
- loading a *.poni file prior to an image will not result in an error message anymore

0.4.1 (stable 12/22/2017)
-------------------------

Expand Down
47 changes: 47 additions & 0 deletions conda_scripts/construct.yaml
@@ -0,0 +1,47 @@
name: dioptas
version: 0.4.1.post1

channels:
- http://repo.continuum.io/pkgs/main
- http://repo.continuum.io/pkgs/free
- http://repo.continuum.io/pkgs/msys2 [win]
- https://conda.anaconda.org/cprescher/

specs:
- python
- conda
- anaconda
- setuptools
- pip
- console_shortcut # [win]
- python.app # [osx]
- numpy
- scipy
- pyqt
- pyqtgraph
- qtpy
- future
- libgfortran # [linux64 or osx]
- h5py
- matplotlib
- six
- pillow
- pywin32 # [win64 or win32]
- yaml
- pyyaml
- requests
- scikit-image
- pycifrw
- fabio>=0.6.0
- pyfai>=0.15.0
- lmfit
- dioptas

## someday, hopefully!
## installer_type: pkg # [osx]

post_install: post_install_unix.sh # [linux64 or osx]
post_install: post_install_windows.bat # [win]

license_file: ../license.txt
welcome_image: ../dioptas/resources/icons/icon.png # [win]
3 changes: 3 additions & 0 deletions conda_scripts/post_install_unix.sh
@@ -0,0 +1,3 @@
#/bin/bash

$PREFIX/bin/dioptas makeshortcut
3 changes: 3 additions & 0 deletions conda_scripts/post_install_windows.bat
@@ -0,0 +1,3 @@
;; post install for windows

%PREFIX%\bin\dioptas makeshortcut
56 changes: 56 additions & 0 deletions conda_scripts/recipe/meta.yaml
@@ -0,0 +1,56 @@

package:
name: dioptas
version: 0.4.1.post1

source:
git_rev: develop
git_url: https://github.com/newville/Dioptas

build:
number: 0
script: python setup.py install

requirements:
build:
- python
- setuptools
- numpy
- scipy
- pyqt
- pyqtgraph
- python.app # [osx]
- libgfortran # [linux64 or osx]
- patchelf # [linux]
- lmfit
- fabio # [linux64 or osx]
- pyfai # [linux64 or osx]
- pycifrw
- future
- scikit-image
- qtpy

run:
- python
- setuptools
- numpy
- scipy
- pyqt
- pyqtgraph
- python.app # [osx]
- lmfit
- fabio # [linux64 or osx]
- pyfai # [linux64 or osx]
- pycifrw
- future
- scikit-image
- qtpy

test:
imports:
- dioptas

about:
home: https://github.com/Dioptas/Dioptas
license: GPL3
summary: GUI program for reduction and exploration of 2D X-ray diffraction data
52 changes: 51 additions & 1 deletion create_executable.bat
@@ -1,3 +1,53 @@
rmdir /s /q dist
rmdir /s /q build
pyinstaller Dioptas.spec

pyinstaller Dioptas.spec

cd dist/dioptas*

rm mkl_avx512.dll, ^
mkl_avx2.dll, ^
mkl_avx.dll, ^
mkl_mc3.dll, ^
mkl_mc.dll, ^
mkl_pgi_thread.dll, ^
mkl_tbb_thread.dll, ^
mkl_sequential.dll, ^
mkl_vml_mc.dll, ^
mkl_vml_mc2.dll, ^
mkl_vml_mc3.dll, ^
mkl_vml_avx.dll, ^
mkl_vml_avx2.dll, ^
mkl_vml_avx512.dll, ^
mkl_scalapack_ilp64.dll, ^
mkl_scalapack_lp64.dll, ^
Qt5Quick.dll, ^
Qt5Qml.dll

rmdir /s /q bokeh, ^
bottleneck, ^
certify, ^
cryptography, ^
Cython, ^
cytoolz, ^
etc, ^
docutils, ^
gevent, ^
jedi, ^
lxml, ^
nbconvert, ^
nbformat, ^
notebook, ^
mpl-data, ^
matplotlib, ^
mkl-fft, ^
msgpack, ^
pandas, ^
share, ^
PyQt5\Qt\bin, ^
PyQt5\Qt\uic


Dioptas.exe
cd ..
cd ..

0 comments on commit 6ae6e36

Please sign in to comment.