What's new
**********

This is a summary of changes, for a detailed list of all the changes see `the github commits changelog <https://github.com/hyperspy/hyperspy/commits/master>`_.

.. _changes_0.4.1:

v0.4.1
======

Enhancements
------------

 * Added TIFF 16, 32 and 64 bits support by using (and distributing) Christoph Gohlke's `tifffile library <http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html>`_.
 * Improved UTF8 support.
 * Reduce the number of required libraries by making mdp and hdf5 not mandatory.
 * Improve the information returned by __repr__ of several objects.
 * DictionaryBrowser now has an export method, i.e. mapped parameters and original_parameters can be exported.
 * New _id_name attribute for Components and Parameters. Improvements in their __repr__ methods
 * Component.name can now be overwriten by the user.
 * New Signal.__str__ method
 * Include Hyperspy in The Python Package Index.


Bugs fixed
----------
 * Non-ascii characters breaking IO and print features fixed.
 * Loading of multiple files at once using wildcards fixed.
 * Remove broken hyperspy-gui script
 * Remove unmantained and broken 2D peak finding and analysis features

Syntax changes
--------------
 * In EELS automatic background feature creates a PowerLaw component, adds it to the model an add it to a variable in the user namespace. The variable has been renamed from `bg` to `background`-
 * pes_gaussian Component renamed to pes_core_line_shape
 
.. _changes_0.4:
 
v0.4
====

Enhancements
------------
 * Add a slider to the filter ui.
 * Add auto_replot to sum.
 * Add butterworth filter.
 * Added centring and auto_transpose to the svd_pca algorithm.
 * Keep the mva_results information when changing the signal type.
 * Added sparse_pca and mini_batch_sparse_pca to decomposition algorithms.
 * Added TV to the smoothing algorithms available in BSS.
 * Added whitening to the mdp ICA preprocessing.
 * Add explained_variance_ratio.
 * Improvements in saving/loading mva data.
 * Add option to perform ICA on the scores.
 * Add orthomax FA algorithm.
 * Add plot methods to Component and Parameter.
 * Add plot_results to Model.
 * Add possibility to export the decomposition and bss results to a folder.
 * Add Signal method `change_dtype`.
 * Add the possibility to pass extra parameters to the ICA algorithm.
 * Add the possibility to reproject the data after a decomposition.
 * Add warning when decomposing a non-float signal.
 * adds a method to get the PCs as a Spectrum object and adds smoothing to the ICA preprocessing
 * Add the possibility to select the energy range in which to perform spike removal operations
 * the smoothings guis now offer differentiation and line color option. Smoothing now does not require a gui
 * Fix reverse_ic which was not reversing the scores and improve the autoreversing method
 * Avoid cropping when is not needed
 * Changed criteria to reverse the ICs
 * Changed nonans default to False for plotting
 * Change the whitening algorithm to a svd based one and add sklearn fastica algorithm
 * Clean the ummixing info after a new decomposition
 * Increase the chances that similar independent components will have the same indexes
 * Make savitzky-golay smoothing work without raising figures
 * Make plot_decomposition* plot only the number of factors/scores determined by output_dimension
 * make the Parameter __repr__ method print its name
 * New contrast adjustment tool
 * New export method for Model, Component and Parameter
 * New Model method: print_current_values
 * New signal, spectrum_simulation
 * New smoothing algorithm: total variance denoising
 * Plotting the components in the same or separate windows is now configurable in the preferences
 * Plotting the spikes is now optional
 * Return an error message when the decomposition algorithm is not recognised
 * Store the masks in mva_results
 * The free parameters are now automically updated on chaning the free attribute
 
Bugs fixed
----------
 * Added missing keywords to plot_pca_factors and plot_ica_factors.
 * renamed incorrectly named exportPca and exportIca functions
 * an error was raised when calling generate_data_from_model
 * a signal with containing nans was failing to plot
 * attempting to use any decomposition plotting method after loading with mva_results.load was raising an error
 * a typo was causing in error in pca when normalize_variance = True
 * a typo was raising an error when cropping the decomposition dimension
 * commit 5ff3798105d6 made decomposition and other methods raise an error
 * BUG-FIXED: the decomposition centering index was wrong
 * ensure_directory was failing for the current directory
 * model data forced to be 3D unnecessarily
 * non declared variable was raising an error
 * plot naming for peak char factor plots were messed up.
 * plot_RGB was broken
 * plot_scores_2D was using the transpose of the shape to reshape the scores
 * remove background was raising an error when the navigation dimension was 0
 * saving the scores was sometimes transposing the shape
 * selecting indexes while using the learning export functions was raising an error
 * the calibrate ui was calculating wrongly the calibration the first time that Apply was pressed
 * the offset estimation was summing instead of averaging
 * the plot_explained_variance_ratio was actually plotting the cumulative, renamed
 * the signal mask in decomposition and ica was not being raveled
 * the slice attribute was not correctly set at init in some scenarios
 * the smoothing and calibrabrion UIs were freezing when the plots where closed before closing the UI window
 * to_spectrum was transposing the navigation dimension
 * variance2one was operating in the wrong axis
 * when closing the plots of a model, the UI object was not being destroyed
 * when plotting an image the title was not displayed
 * when the axis size was changed (e.g. after cropping) the set_signal_dimension method was not being called
 * when using transform the data was being centered and the resulting scores were wrong

Syntax changes
--------------

 * in decomposition V rename to explained_variance
 * In FixedPattern, default interpolation changed to linear
 * Line and parabole components deleted + improvements in the docstrings
 * pca_V = variance
 * mva_result renamed to learning_results
 * pca renamed to decomposition
 * pca_v and mva_results.v renamed to scores pc renamed to factors pca_build_SI renamed to get_pca_model ica_build_SI renamed to get_ica_model
 * plot_explained_variance renamed to plot_explained_variance_ratio
 * principal_components_analysis renamed to decomposition
 * rename eels_simulation to eels_spectrum_simulation
 * Rename the output parameter of svd_pca and add scores
 * Replace plot_lev by plot_explained_variance_ratio
 * Scores renamed to loadings
 * slice_bool renamed to navigate to make its function more explicit
 * smoothing renamed to pretreatment and butter added
 * variance2one renamed to normalize_variance
 * w renamed to unmixing matrix and fixes a bug when loading a mva_result in which output_dimension = None

ubshells are again availabe in the interactive session
* Several changes to the interface.
* The documentation was updated to reflex the last changes
* The microscopes.csv file was updated so it no longer contains the Orsay VG parameters.

