Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
73b1a36
Fix atom color if valency is present
AndrewSazonov Jul 13, 2022
7d2ea04
Update MSPS table
AndrewSazonov Jul 13, 2022
8f6ce45
Test ubuntu only (without video tutorials)
AndrewSazonov Jul 13, 2022
a3ae1b4
Bump pyinstaller to 5.2 and QtInstallerFramework to 4.4.1
AndrewSazonov Jul 13, 2022
99fa928
Fix QtInstallerFramework online repository file path
AndrewSazonov Jul 13, 2022
4d00dd4
Freeze PyInstaller version to 5.2
AndrewSazonov Jul 13, 2022
162d471
Bump pefile to 2022.5.30
AndrewSazonov Jul 13, 2022
ee37b71
Debug QtIFW path on ubuntu
AndrewSazonov Jul 13, 2022
55a5a39
More debug
AndrewSazonov Jul 13, 2022
72277bb
More debug
AndrewSazonov Jul 13, 2022
591a1cf
Add install libxcb-shape0 on ubuntu
AndrewSazonov Jul 13, 2022
627eaa5
Clean up MakeInstaller script after debug
AndrewSazonov Jul 13, 2022
8abcda3
Bump opencv and ffmpeg
AndrewSazonov Jul 13, 2022
ca4da76
Capitalize `Easy` in `EasyDiffraction`
AndrewSazonov Jul 13, 2022
1375679
Fix package name
AndrewSazonov Jul 13, 2022
8cc20f6
Fix .desktop file name
AndrewSazonov Jul 13, 2022
8e2ac93
Some debug
AndrewSazonov Jul 13, 2022
55314f5
Enable all platforms
AndrewSazonov Jul 13, 2022
06da5f2
Merge remote-tracking branch 'origin/release-0.8.4' into capital_e
Jul 13, 2022
baa8c0d
Back to pyinstaller 4.5.1
AndrewSazonov Jul 13, 2022
dc24cd5
Actually get back to pyinstaller 4.5.1
AndrewSazonov Jul 13, 2022
7edb05a
Enable test videos on Ubuntu
AndrewSazonov Jul 13, 2022
27c018c
Update README.md [ci skip]
Jul 13, 2022
de6fed7
Bragg peaks display fix in EasyDiffLib
Jul 14, 2022
3c2b9ea
Decrease sleep time and trigger build with new EDL
Jul 14, 2022
4c1341f
Modify layout of the experiment group
Jul 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 install libxcb-xinerama0
sudo apt-get -o Acquire::Retries=3 install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0
sudo apt-get -o Acquire::Retries=3 install libxcb-shape0
sudo apt-get -o Acquire::Retries=3 install libpulse-mainloop-glib0
# sudo apt-get install libgfortran4
# echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

<img height="80"><img src="./resources/images/ed_logo.svg" height="65">

**easyDiffraction** is a scientific software for modelling and analysis of diffraction data. Currently, **easyDiffraction** covers classical 1D unpolarized neutron powder diffraction data collected using constant wavelength (CW) or time-of-flight (TOF) diffractometers.
**EasyDiffraction** is a scientific software for modelling and analysis of diffraction data. Currently, **EasyDiffraction** covers classical 1D unpolarized neutron powder diffraction data collected using constant wavelength (CW) or time-of-flight (TOF) diffractometers.

![easyDiffraction Screenshot](./resources/images/ed_analysis_dark.png)

## What is easydiffraction for?
## What is EasyDiffraction for?

**easyDiffraction** allows simulation of diffraction patterns based on a structural model and refinement of its parameters. For refinement, the program uses a number of fitting engines (minimizers) such as [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols).
**EasyDiffraction** allows simulation of diffraction patterns based on a structural model and refinement of its parameters. For refinement, the program uses a number of fitting engines (minimizers) such as [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols).

**easyDiffraction** is similar to crystallographic programs like FullProf, Jana, GSAS, ShelX, etc. Unlike these programs **easyDiffraction** is based on _external_ crystallographic libraries (calculation engines) such as [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS). This allows **easyDiffraction** to cover different functionality aspects within a single, intuitive and user-friendly graphical interface. These libraries are included with the installation so there is no need to compile/install them separately.
**EasyDiffraction** is similar to crystallographic programs like FullProf, Jana, GSAS, ShelX, etc. Unlike these programs **EasyDiffraction** is based on _external_ crystallographic libraries (calculation engines) such as [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) (experimental). This allows **EasyDiffraction** to cover different functionality aspects within a single, intuitive and user-friendly graphical interface. These libraries are included with the installation so there is no need to compile/install them separately.

## Main features

**easyDiffraction** is an open source project under the [BSD-3-Clause License](LICENSE.md).
**EasyDiffraction** is an open source project under the [BSD-3-Clause License](LICENSE.md).

**easyDiffraction** application is cross-platform, with support for Windows, macOS and Linux (Ubuntu). Its intuitive tabbed interface allows for a clear and defined data modelling and analysis workflow. There are also built-in step-by-step user guides and tutorials for new users.
**EasyDiffraction** application is cross-platform, with support for Windows, macOS and Linux (Ubuntu). Its intuitive tabbed interface allows for a clear and defined data modelling and analysis workflow. There are also built-in step-by-step user guides and tutorials for new users.

Current main features of **easydiffraction**:
Current main features of **Easydiffraction**:

- Support for both constant-wavelength and time-of-flight 1D unpolarized neutron powder diffraction data.
- Simulations of diffraction pattern using [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) calculation engines.
- Simulations of diffraction pattern using [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) (experimental) calculation engines.
- Structure refinement (yet unstable) using aforementioned engines.
- Multiple minimization engines: [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols).
- Parameter constraints during refinement.
Expand All @@ -32,7 +32,7 @@ Current main features of **easydiffraction**:
- Interactive HTML and standard PDF report generation.
- Undo/redo for both parameter changes and fitting.

Planned improvements / new functionality for **easydiffraction**:
Planned improvements / new functionality for **EasyDiffraction**:

- Improved refinement.
- Time-of-flight support using [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS).
Expand All @@ -49,25 +49,25 @@ Planned improvements / new functionality for **easydiffraction**:

### Downloading

The official **easyDiffraction** installer for Windows, macOS and Linux (Ubuntu) can be found [here](https://github.com/easyScience/easyDiffractionApp/releases):
The official **EasyDiffraction** installer for Windows, macOS and Linux (Ubuntu) can be found [here](https://github.com/easyScience/easyDiffractionApp/releases):

### Installing

Run **easyDiffraction** installer and follow the instructions.
Run **EasyDiffraction** installer and follow the instructions.

### Uninstalling

Run **MaintenanceTool** from the **easydiffraction** installation directory, select _Remove all components_ and follow the instructions.
Run **MaintenanceTool** from the **EasyDiffraction** installation directory, select _Remove all components_ and follow the instructions.

## Common Issues

- On `macOS`, if you see the message _easyDiffractionSetup.app can't be opened because it is from an unidentified developer_, do the following:
In the **Finder**, locate the **easydiffraction** installer application, then _control-click_ the installer icon, then choose _Open_ from the shortcut menu and finally click _Open_.
- On `macOS`, if you see the message _EasyDiffractionSetup.app can't be opened because it is from an unidentified developer_, do the following:
In the **Finder**, locate the **EasyDiffraction** installer application, then _control-click_ the installer icon, then choose _Open_ from the shortcut menu and finally click _Open_.
- On `Linux` based system there can be the following error on startup: _Failed to create OpenGL context for format QSurfaceFormat_. This is due to a system OpenGL driver problem. Please re-install your graphics card drivers.

## Contributing

We absolutely welcome contributions. **easyDiffraction** is maintained by the [European Spallation Source ERIC (ESS)](https://europeanspallationsource.se/) and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas.
We absolutely welcome contributions. **EasyDiffraction** is maintained by the [European Spallation Source ERIC (ESS)](https://europeanspallationsource.se/) and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas.

## Get in touch

Expand Down
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Changes
### Bug Fixes

- The application installer on macOS is now signed.
- The Python-based backend framework has been updated from version 3.7 to 3.8.
- CI for all 3 platforms now works, including making a test video.
- CrysFML simulation now shows Bragg peaks.
11 changes: 10 additions & 1 deletion easyDiffractionApp/Gui/Components/SampleAtoms.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ EaComponents.TableView {

XmlRole { name: "label"; query: "label/value/string()" }
XmlRole { name: "type"; query: "specie/value/string()" }
//XmlRole { name: "color"; query: "color/string()" }
XmlRole { name: "x"; query: "fract_x/value/number()" }
XmlRole { name: "y"; query: "fract_y/value/number()" }
XmlRole { name: "z"; query: "fract_z/value/number()" }
Expand Down Expand Up @@ -250,9 +249,19 @@ EaComponents.TableView {
'Ts' : '#000000',
'Og' : '#000000'
}
// Simple case, e.g. Co
if (colors.hasOwnProperty(symbol)) {
return colors[symbol]
}
// First 2 symbols, if valency is given for 2 characters element, e.g. Mn3+
if (colors.hasOwnProperty(symbol.substring(0, 2))) {
return colors[symbol.substring(0, 2)]
}
// First symbol, if valency is given for 1 characters element, e.g. O2-
if (colors.hasOwnProperty(symbol.substring(0, 1))) {
return colors[symbol.substring(0, 1)]
}
// Transparent color if no elements found
return 'transparent'
}

Expand Down
17 changes: 12 additions & 5 deletions easyDiffractionApp/Gui/Components/SampleMsps.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import Gui.Globals 1.0 as ExGlobals
EaComponents.TableView {
property int numColumnWidth: EaStyle.Sizes.fontPixelSize * 2.5
property int labelColumnWidth: EaStyle.Sizes.fontPixelSize * 2.5
property int typeColumnWidth: EaStyle.Sizes.fontPixelSize * 4.0
property int typeColumnWidth: EaStyle.Sizes.fontPixelSize * 4.5
property int numFixedColumn: 3
property int numFlexColumn: 7
property int numFlexColumn: 6
property int flexColumnWidth: (width -
numColumnWidth -
labelColumnWidth -
Expand Down Expand Up @@ -76,17 +76,24 @@ EaComponents.TableView {
enabled: false
width: typeColumnWidth
headerText: "Type"
model: ["Cani", "Ciso"]
model: ["None", "Cani", "Ciso"]
//currentIndex: model.indexOf(modelMspType)
Component.onCompleted: currentIndex = model.indexOf(modelMspType)
Component.onCompleted: {
currentIndex = model.indexOf(modelMspType)
if (currentIndex === -1) {
currentIndex = 0
}
}
}

/*
EaComponents.TableViewTextInput {
width: flexColumnWidth
headerText: "\u03C7Iso"
headerText: "Iso"//"\u03C7Iso"
text: EaLogic.Utils.toFixed(model.mspIso)
onEditingFinished: editParameterValue(model.mspIsoId, text)
}
*/

EaComponents.TableViewTextInput {
width: flexColumnWidth
Expand Down
20 changes: 11 additions & 9 deletions easyDiffractionApp/Gui/Pages/Experiment/SideBarBasic.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EaComponents.SideBarColumn {
}

EaElements.GroupBox {
title: qsTr("Instrument and experiment type")
title: qsTr("Experiment type") // qsTr("Instrument and experiment type")
enabled: ExGlobals.Constants.proxy.experiment.experimentLoaded ||
ExGlobals.Constants.proxy.experiment.experimentSkipped

Expand Down Expand Up @@ -116,7 +116,7 @@ EaComponents.SideBarColumn {

EaElements.ComboBox {
enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2
model: ["Neutron"]
}
}
Expand All @@ -131,7 +131,7 @@ EaComponents.SideBarColumn {
property string experimentType: ExGlobals.Constants.proxy.sample.experimentType

enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2

textRole: "text"
valueRole: "value"
Expand All @@ -154,6 +154,11 @@ EaComponents.SideBarColumn {
}
}
}
}

Row {
visible: true
spacing: EaStyle.Sizes.fontPixelSize

Column {
EaElements.Label {
Expand All @@ -163,14 +168,10 @@ EaComponents.SideBarColumn {

EaElements.ComboBox {
enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2
model: ["Powder"]
}
}
}
Row {
visible: true
spacing: EaStyle.Sizes.fontPixelSize

Column {
EaElements.Label {
Expand All @@ -181,7 +182,7 @@ EaComponents.SideBarColumn {
EaElements.ComboBox {
property bool experimentType: ExGlobals.Constants.proxy.experiment.isSpinPolarized
enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3
width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2

textRole: "text"
valueRole: "value"
Expand Down Expand Up @@ -290,6 +291,7 @@ EaComponents.SideBarColumn {

EaElements.GroupBox {
title: qsTr("Associated phases")
last: !ExGlobals.Constants.proxy.experiment.isSpinPolarized
enabled: ExGlobals.Constants.proxy.experiment.experimentLoaded ||
ExGlobals.Constants.proxy.experiment.experimentSkipped

Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized

#[tool.poetry.dev-dependencies]
# PyInstaller
pyinstaller = '4.5.1' # 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app
pyinstaller = '4.5.1' # 4.6-5.2 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app
#pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' }
pywin32-ctypes = { version = '^0.2.0', platform = 'win32' }
pypiwin32 = { version = '^223', platform = 'win32' }
pefile = { version = '^2019.4.18', platform = 'win32' }
pefile = { version = '^2022.5.30', platform = 'win32' }
# Misc
toml = '^0.10.2'
requests = '^2.25.1'
dephell_licenses = '^0.1.7'
ffmpeg-python = '^0.2.0'
mss = '^6.1.0'
#opencv-python = '^4.5.1'
opencv-python = '4.5.1.48'
google-trans-new = '^1.1.9'
gTTS = '^2.2.2'
Expand All @@ -55,7 +54,7 @@ easyDiffraction = 'easyDiffractionApp.main:main'
# CUSTOM CONFIG

[release]
app_name = 'easyDiffraction'
app_name = 'EasyDiffraction'
tag_template = 'v{VERSION}'
title_template = 'Version {VERSION} ({DATE})'
description_file = 'RELEASE.md'
Expand Down Expand Up @@ -165,16 +164,16 @@ manual_exclude = [ 'mfc*', 'msvcp*', 'VCRUNTIME*',
'*Qt*Scxml*', '*Qt*Sensors*', '*Qt*Sql*', '*Qt*VirtualKeyboard*', '*Qt*Wayland*' ]

[ci.qtifw.setup]
version = '4.1.0'
version = '4.4.1'
https_mirrors = ['download.qt.io', 'ftp.fau.de/qtproject', 'mirrors.dotsrc.org/qtproject']
base_path = 'official_releases/qt-installer-framework'
file_name_base = 'QtInstallerFramework'
file_platform = { macos = 'macOS-x86_64', ubuntu = 'linux-x64', windows = 'windows-x86' }
file_platform = { macos = 'macOS-x64', ubuntu = 'linux-x64', windows = 'windows-x64' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make the Windows installer 64-bit. We will have to test it extensively then, as it is a rather significant change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the only platforms supported in QtInstallerFramework 4.4.1.

file_ext = { macos = 'dmg', ubuntu = 'run', windows = 'exe' }
installation_path = { macOS = '/Users/runner/Qt', Linux = '/home/runner/Qt', Windows = 'C:\Qt' }

[ci.ffmpeg.macos] # https://evermeet.cx/ffmpeg/ffmpeg-4.3.zip
version = '4.3.1'
version = '5.0.1'
base_url = 'https://evermeet.cx/ffmpeg'
file_name_base = 'ffmpeg-'
file_ext = '.zip'
Expand Down
2 changes: 1 addition & 1 deletion tools/Scripts/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, branch_name=None):
self.repository_dir_suffix = self.__dict__['ci']['app']['setup']['repository_dir_suffix']

# Project
self.package_name = f'{self.app_name}App'
self.package_name = self.__dict__['tool']['poetry']['name']
self.license_file = self.__dict__['ci']['project']['license_file']

def __getitem__(self, key):
Expand Down
4 changes: 2 additions & 2 deletions tools/Scripts/InstallerControlScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Controller.prototype.IntroductionPageCallback = function()
if (installer.isInstaller())
{
var msg = ""
msg += "<p>Welcome to the easyDiffraction Setup Wizard.</p>"
msg += "<p>easyDiffraction is a scientific software for modelling and analysis of diffraction data.</p>"
msg += "<p>Welcome to the EasyDiffraction Setup Wizard.</p>"
msg += "<p>EasyDiffraction is a scientific software for modelling and analysis of diffraction data.</p>"
msg += "<p>For more details, please visit <a href=\"https://easydiffraction.org\">https://easydiffraction.org</a></p>"
page.MessageLabel.setText(msg)
}
Expand Down
8 changes: 4 additions & 4 deletions tools/Scripts/InstallerInstallScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ Component.prototype.createOperations = function()

component.addOperation(
"Copy",
"@TargetDir@/easyDiffraction.desktop",
"@HomeDir@/.local/share/applications/easyDiffraction.desktop"
"@TargetDir@/@ProductName@.desktop",
"@HomeDir@/.local/share/applications/@ProductName@.desktop"
)

/*
component.addOperation(
"Copy",
"@TargetDir@/easyDiffraction.desktop",
"/usr/share/applications/easyDiffraction.desktop"
"@TargetDir@/@ProductName@.desktop",
"/usr/share/applications/@ProductName@.desktop"
)
*/
}
Expand Down
2 changes: 1 addition & 1 deletion tools/Scripts/MakeInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def createInstallerSourceDir():

def createOfflineInstaller():
try:
message = 'create installer'
message = 'create offline installer'
qtifw_bin_dir_path = os.path.join(qtifwDirPath(), 'bin')
qtifw_binarycreator_path = os.path.join(qtifw_bin_dir_path, 'binarycreator')
qtifw_installerbase_path = os.path.join(qtifw_bin_dir_path, 'installerbase')
Expand Down