------------------
We have made significant changes in preparation for a 1.0 release on
PyPI. If you have used EarthPy previously, please review the changes
below. You may need to update your code accordingly.
Changed
~~~~~~~
- ``normalized_diff()`` function arguments have been flipped. Please
update all of your old code accordingly. Changes include:
- Arguments are now provided as normalized_diff(b1, b2)
- Math will be calculated (b1-b2) / (b1+b2)
- Example: ``ndvi = es.normalized_diff(b1=nir_band, b2=red_band)``
- ``normalized_diff()`` now:
- returns unmasked array by default
- returns masked array if there are nan values present
- converts infinity values that result from division by zero to nan
values
- ``stack()`` replaces ``stack_raster_tifs()``, which is now
deprecated. The new ``stack()`` function works similarly to
``stack_raster_tifs``. Inputs parameters are now a list of filepaths
and an optional filepath parameter that when populated saves the
stacked raster array as a geotiff file. The default return is a numpy
ndarray.
- The parameter order for ``bytescale`` has changed:
- PREVIOUS ORDER: data, cmin=None, cmax=None, high=255, low=0
- NEW ORDER: data, high=255, low=0, cmin=None, cmax=None
- All plot functions moved to a new ``earthpy.plot`` module. To import
plot functions first import the plot module:
``import earthpy.plot as ep``. Then you can call functions as
follows:
- ``ep.plot_rgb()``
- ``ep.draw_legend()``
- ``ep.hist()``
- ``ep.colorbar()``
- ``ep.plot_bands()``
Added
~~~~~
- ``draw_legend()`` works now on different types of categorical raster plots.
- ``colorbar()`` has also been fixed to work given updates to ``Matplotlib``
- A new mask function has been released as ``mask_pixels()``.
- We now have tests through ``pytest`` that run on Travis CI.
- API documentation is now generated automatically from docstrings with ``autodoc``.
- Example code in documentation is tested using ``doctest``
Deprecated
~~~~~~~~~~
- ``stack_raster_tifs()`` has been deprecated and replaced with ``stack()``.