Skip to content

Commit

Permalink
update 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierpascalhenry committed Dec 16, 2019
1 parent da80858 commit 1a7b20e
Show file tree
Hide file tree
Showing 118 changed files with 43,966 additions and 7,462 deletions.
Binary file not shown.
29 changes: 26 additions & 3 deletions Documentation/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
#### To do list: ####

* add map export possibility for GE. (v 1.1)
* rework the plot function. (v 1.1)
* add slider to plot window for 3D data. (v 1.1)
* add map export possibility for GE. (v 1.2)
* add HDF5 handling (with EGADS v 1.2.0, v 1.2)

#### To fix list: ####

* nothing


### December 16 2019, Release version 1.1.0 ###

More projections in Cartopy have been added to the plot function. At this time, labels can be added to only two projections (PlateCarree and Mercator). Once the version 0.18 of Cartopy is released, labels will be available for more projections.

* FIXED:
* size of splitters in the variable and new variable tabs has been corrected.
* text for EGADS and GUI updates has been fixed.
* style has been fixed for option and export windows.

* ADDED:
* a function to update the config file has been added.
* a new item in the File menu gives the user the possibility to access quickly user-defined folders, if the dedicated option has been enabled in the options.
* a list of opened files is now available if the user enables the option.
* an option has been added to plot standard 2D and 3D data based on user needs.
* an option has been added to plot georeferenced data as standard data.
* if a file is open, a check on the file path is done before opening it to be sure that the file exists.
* few info messages have been added in the option window and in the plot window.
* it is now possible to set ticks manually for the colorbar in the export window.

* MODIFIED:
* it is now possible to plot 3D gridded data, buttons are available to navigate into layers.
* the plot window has been reworked and enhanced.


### September 6 2019, Release version 1.0.3 ###

* FIXED:
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version:
-------

EGADS Lineage GUI 1.0.3 (Python 3).
EGADS Lineage GUI 1.1.0 (Python 3).


Developments:
Expand Down Expand Up @@ -49,13 +49,16 @@ Actually, EGADS GUI is a simple python script. Just open a terminal in the EGADS

Do not forget to install dependancies:
* Python (3.5.4 or newer)
* PyQt5 (5.11.2 or newer)
* EGADS Lineage (0.9.5 or newer)
* PyQt5 (5.11.3 or newer)
* EGADS Lineage (1.0.0 or newer)
* Matplotlib (2.2.2 or newer)
* Cartopy (0.17 or newer)
* Cartopy (0.17 or newer, optional, only to draw maps)
* Simplekml (1.3.1 or newer)
* Markdown (3.1.1 or newer, optional, only to read the changelog in the GUI)
* Requests (2.18.4 or newer, optional, only to check updates if the user activates the option)
* Pillow (5.2 or newer, optional, only to save figures in JPEG format)

Anaconda3 can be a good alternative, in particular if the use of Cartopy is mandatory and if the user can't build Cartopy himself.


Stand-alone package:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '1.0.3'
version = '1.1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.3'
release = '1.1.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
21 changes: 7 additions & 14 deletions doc/source/description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The EGADS GUI is composed of different windows, designed to display information
Current GUI limitations
-----------------------

Actually, the GUI has few limitations based on the development time and the number of person working on this project. First the file formats handled by the GUI. Even if EGADS can handle text files (raw, ASCII and csv), the GUI can handle only NetCDF and NASA Ames file format at this time. Second, matrix variable (that is to say variables based on multiple dimensions, or gridded data) can be loaded in the GUI, but, at this time, only time series can be handled by the plot function. The plot function has been modified to handle data based on multiple dimensions, but it is still at an early development stage. Third, the NASA Ames function can only handle files with a FFI equal to 1001.
Actually, the GUI has few limitations based on the development time and the number of person working on this project. First the file formats handled by the GUI. Even if EGADS can handle text files (raw, ASCII and csv), the GUI can handle only NetCDF and NASA Ames file format (FFI 1001) at this time.


---------------
Expand Down Expand Up @@ -145,16 +145,9 @@ The data icons

The sixth, seventh, and eighth icons are here to manipulate data:

* |create| : With this function, the user have the possibility to create a simple variable : a time series composed of 0 or 1, or a suite of values from n_start to n_end, or a matrix with personal values. It can be useful when a small matrix with optical values is needed in the case of few optical algorithms. NOT AVAILABLE AT THIS TIME !
* |migrate| : In EGADS GUI, once a variable is processed through an algorithm, the result is a new variable displayed in the ``New variables`` tab of the central widget. In this tab, a variable can't be saved in a file, only variables in the ``Variable`` tab are saved. The user has to migrate the new variable to the ``Variables`` tab. And he can do that with this function.
* |delete| : The purpose of this function is to delete a variable. If the file is saved after a deletion, obviously the deleted variable won't appear in the file anymore.

.. |create| image:: images/icons/new_var_icon.png
:width: 130px
:height: 130px
:scale: 25 %
:align: middle

.. |migrate| image:: images/icons/migrate_icon.png
:width: 130px
:height: 130px
Expand Down Expand Up @@ -251,7 +244,7 @@ The system doesn't test the algorithm created by the user, it is expected to wor
English and normal characters must be used to write every part of the algorithm. Special characters can't be used and it will lead to a crash if the GUI tries to save a file with special characters.
.. NOTE ::
For more details on how to create algorithms and the purpose of each field, please take a look in the EGADS Lineage Documentation, chapter ALGORITHM DEVELOPMENT, p. 28.
For more details on how to create algorithms and the purpose of each field, please take a look in the EGADS Lineage Documentation, chapter ALGORITHM DEVELOPMENT.
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -348,9 +341,9 @@ The batch processing window

For those who want to process more than one file at a time, they can use the batch processing function from the File menu.

.. image:: images/egads_gui_screencaptures/EGADS_GUI_batch_processing_6.png
.. image:: images/egads_gui_screencaptures/EGADS_GUI_batch_processing_exemple.png
:width: 836px
:height: 596px
:height: 643px
:scale: 45 %
:align: center

Expand Down Expand Up @@ -441,7 +434,7 @@ This tab behaves completely as the ``Variables`` tab.
The footbar
-----------

The purpose of the footbar is to display information about the file actually loaded, like the name, the size and the conventions, and messages to confirm the actions of the user, like the modification of metadata or the creation of variables.
The purpose of the footbar is to display information about the file actually loaded, like the name, the size and the conventions, and messages to confirm the actions of the user, like the modification of metadata or the creation of variables. Since version 1.0.0, messages are displayed for few seconds about the actions performed and confirmed by the user: modification of metadata, deletion of variables, ...


---------------------
Expand All @@ -451,8 +444,8 @@ EGADS and GUI options
The options of EGADS and its GUI are controled through the option window, in the About menu.

.. image:: images/egads_gui_screencaptures/EGADS_GUI_option_window.png
:width: 732px
:height: 339px
:width: 702px
:height: 389px
:scale: 45 %
:align: center

Expand Down
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_000.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_002.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_003.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_004.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_005.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_007.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_012.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_017.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/egads_gui_screencaptures/EGADS_GUI_018.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions doc/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@ From the variable attributes window
:align: center


*********************************
How to create a simple variable ?
*********************************

This function has not been implemented yet.


**************************
How to process a variable?
**************************
Expand Down Expand Up @@ -368,7 +361,7 @@ How to delete a variable?
How to create an algorithm through the GUI?
*******************************************

EGADS GUI offers the possibility to create algorithm from a window, by filling in different type of fields. If a complex algorithm has to be written, the most suitable way is to use a text editor like Notepad++ (Windows) or Kate (Linux) and modify the template provided in the EGADS algorithm directory. For more details on how to create algorithms and the purpose of each field, please take a look in the EGADS Lineage Documentation, chapter ALGORITHM DEVELOPMENT, p. 28.
EGADS GUI offers the possibility to create algorithm from a window, by filling in different type of fields. If a complex algorithm has to be written, the most suitable way is to use a text editor like Notepad++ (Windows) or Kate (Linux) and modify the template provided in the EGADS algorithm directory. For more details on how to create algorithms and the purpose of each field, please take a look in the EGADS Lineage Documentation, chapter ALGORITHM DEVELOPMENT.

* To launch the algorithm creation window, just click on |create algorithm|.

Expand Down Expand Up @@ -416,7 +409,7 @@ EGADS GUI offers the possibility to create algorithm from a window, by filling i
There is no system to check the algorithm result. Once the algorithm is saved, EGADS and its GUI expect the algorithm to be true and stable.

.. NOTE::
If using the stand-alone version of the GUI, new algorithms are saved in the ``user_algorithms`` folder in the main directory. The user still has the possibility to create an algorithm manually with a text editor. In that case, follow the EGADS documentation about new algorithms and save the algorithm in the ``user_algorithms`` folder. Do not forget to edit or create __init__.py files.
If using the stand-alone version of the GUI, new algorithms are saved in the ``user_algorithms`` folder in the main directory. The user always has the possibility to create an algorithm manually with a text editor. In that case, follow the EGADS documentation about new algorithms and save the algorithm in the ``user_algorithms`` folder. Do not forget to edit or create __init__.py files.


**********************************************
Expand Down Expand Up @@ -482,7 +475,7 @@ The EGADS GUI offers the possibility to display the values of a variable.
How to plot a variable ?
************************

By integrating the Python module Matplotlib, the EGADS GUI gives the user a great tool to plot data and save the result in a graphic file. Actually only time series can be plotted. Gridded data should be integrated quickly.
By integrating the Python modules Matplotlib and Cartopy, the EGADS GUI gives the user a great tool to plot data and save the result in a graphic file. Times series and gridded data, georeferenced or not, are handled by the plot window. Actually, there is a limitation with gridded data. Due to an early version of Cartopy, the modification of ticks and labels is only possible for PlateCarree and Mercator projection, until a new version of Cartopy is released.

* To access the plot module, select first the ``Variables`` tab.

Expand Down Expand Up @@ -513,6 +506,15 @@ By integrating the Python module Matplotlib, the EGADS GUI gives the user a grea
:scale: 45 %
:align: center

* An example of what can be achieved with gridded data.

.. image:: images/egads_gui_screencaptures/EGADS_GUI_plot_data_4.png
:width: 1252px
:height: 789px
:scale: 45 %
:align: center


******************************************
How to export data to an external format ?
******************************************
Expand Down
8 changes: 6 additions & 2 deletions egads_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
from PyQt5 import QtWidgets, QtGui, QtCore
from ui.mainwindow import MainWindow
from ui._version import _gui_version
from functions.utils import create_option_file, create_logging_handlers
from functions.utils import create_option_file, create_logging_handlers, update_config_file
import configparser
from PyQt5.QtCore import QT_VERSION_STR as qt_version
from matplotlib import __version__ as mpl_version
from cartopy import __version__ as cy_version
try:
from cartopy import __version__ as cy_version
except ImportError:
cy_version = None
from simplekml import __version__ as km_version
try:
from markdown import __version__ as mk_version
Expand All @@ -32,6 +35,7 @@ def launch_egads_gui(gui_path, user_path):
if not pathlib.Path(user_path).is_dir():
pathlib.Path(user_path).mkdir()
create_option_file(user_path)
update_config_file(user_path)
config_dict = configparser.ConfigParser()
config_dict.read(str(pathlib.Path(user_path).joinpath('egads_gui.ini')))
create_logging_handlers(config_dict, 'egads_gui.log', user_path)
Expand Down
32 changes: 28 additions & 4 deletions functions/export_window_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
from ui.Ui_waitwindow import Ui_waitWindow
from functions.gui_elements import QtWaitingSpinner
from functions.thread_functions import ExportThread
from functions.other_windows_functions import MyInfo
from functions.other_windows_functions import MyInfo, MyColorbarTicks
from functions.help_functions import export_information_text
from functions.material_functions import cmap_dict


class MyExport(QtWidgets.QDialog, Ui_exportWindow):
Expand Down Expand Up @@ -43,6 +44,7 @@ def __init__(self, var_dict):
self.info_button_9.clicked.connect(self.export_button_info)
self.info_button_10.clicked.connect(self.export_button_info)
self.info_button_11.clicked.connect(self.export_button_info)
self.ew_ticks_button.clicked.connect(self.colorbar_tick_option_window)
self.ew_combobox_2.currentIndexChanged.connect(self.activate_export_button)
self.ew_combobox_3.currentIndexChanged.connect(self.activate_export_button)
self.ew_combobox_4.currentIndexChanged.connect(self.activate_export_button)
Expand All @@ -60,12 +62,14 @@ def __init__(self, var_dict):
self.ew_combobox_6.currentIndexChanged.connect(self.activate_export_button)
self.ew_checkbox_5.clicked.connect(self.activate_colormap_values)
self.ew_checkbox_6.clicked.connect(self.activate_colormap_dimensions)
self.ew_line_2.textEdited.connect(self.colorbar_tick_option_man_remove)
self.ew_line_3.textEdited.connect(self.colorbar_tick_option_man_remove)
self.ew_line_4.textEdited.connect(self.colorbar_tick_option_man_remove)
self.idx_base = 0
self.export_format = None
self.export_dict = {}
self.colormap_dict = {1: 'coolwarm', 2: 'jet', 3: 'ocean', 4: 'spectral', 5: 'hot', 6: 'hsv', 7: 'seismic',
8: 'terrain'}
self.var_list = []
self.cbar_ticks_options = []
self.ew_combobox_1.removeItem(2)
logging.info('gui - export_window_functions.py - MyExport - ready')

Expand Down Expand Up @@ -173,6 +177,14 @@ def activate_colormap_values(self):
self.ew_label_14.setEnabled(not self.ew_checkbox_5.isChecked())
self.ew_label_15.setEnabled(not self.ew_checkbox_5.isChecked())
self.ew_label_16.setEnabled(not self.ew_checkbox_5.isChecked())
self.ew_ticks_button.setEnabled(not self.ew_checkbox_5.isChecked())
self.pw_grid_label_57.setEnabled(not self.ew_checkbox_5.isChecked())
self.pw_grid_label_57.setText('')

def colorbar_tick_option_man_remove(self):
logging.debug('gui - export_window_functions.py - MyExport - colorbar_tick_option_man_remove')
self.pw_grid_label_57.setText('')
self.cbar_ticks_options = []

def activate_transparency_checkbox(self):
logging.debug('gui - export_window_functions.py - MyExport - activate_transparency_checkbox')
Expand Down Expand Up @@ -266,7 +278,7 @@ def export_ge_ts_function(self):
export_dict['Coordinates']['lon'] = self.ew_combobox_2.currentText()
export_dict['Coordinates']['lat'] = self.ew_combobox_3.currentText()
export_dict['Coordinates']['alt'] = self.ew_combobox_4.currentText()
export_dict['Colormap']['colormap'] = self.colormap_dict[self.ew_combobox_6.currentIndex()]
export_dict['Colormap']['colormap'] = cmap_dict()[self.ew_combobox_6.currentIndex()]
export_dict['Colormap']['position'] = int(self.ew_combobox_7.currentIndex())
export_dict['Colormap']['color_value'] = int(self.ew_combobox_8.currentIndex())
export_dict['Options']['wall'] = self.ew_checkbox_1.isChecked()
Expand All @@ -293,6 +305,7 @@ def export_ge_ts_function(self):
export_dict['Colormap']['steps'] = float(self.ew_line_3.text())
except ValueError:
export_dict['Colormap']['steps'] = None
export_dict['Colormap']['ticks_list'] = self.cbar_ticks_options
try:
export_dict['Colormap']['fig_width'] = float(self.ew_line_5.text())
except ValueError:
Expand Down Expand Up @@ -334,6 +347,17 @@ def export_button_info(self):
info_window = MyInfo(self.export_information_text[self.sender().objectName()])
info_window.exec_()

def colorbar_tick_option_window(self):
logging.debug('gui - export_window_functions.py - MyExport - colorbar_tick_option_window')
cbar_ticks_window = MyColorbarTicks(self.cbar_ticks_options)
cbar_ticks_window.exec_()
if cbar_ticks_window.new_option_dict is not None:
self.cbar_ticks_options = cbar_ticks_window.new_option_dict
self.ew_line_2.setText('man')
self.ew_line_3.setText('man')
self.ew_line_4.setText('man')
self.pw_grid_label_57.setText(str(self.cbar_ticks_options))

def closeWindow(self):
logging.debug('gui - export_window_functions.py - MyExport - closeWindow')
self.close()
Expand Down

0 comments on commit 1a7b20e

Please sign in to comment.