What’s new in PyCPL 1.0

PyCPL 1.0 is the first, official release meant for production use.

Added

  • Added test cases for all functions in cpl.core.Image and cpl.core.ImageList. (!176)

  • Added package version attribute cpl.__version__. This is taken from the package meta data in setup.cfg and propagated to the extension. (!166)

  • Added environment variables PYCPL_BUILD_DEBUG, PYCPL_BUILD_SANITIZE and PYCPL_BUILD_VERBOSE. These are intended for maintainers and set up the build system for debugging, use with (address) sanitizer, and verbose compiler output. The respective compiler flags are taken from internal presets. (!166)

  • Added numpy masked_array support plus tests for cpl.core.Table column output (normal and cpl.core.Type.ARRAY columns) where invalid data are masked. Added cpl.core.Table as_array attribute. (!174)

  • Added test cases for testing dump functions. (!165)

  • Finished docstrings for cpl.core.ImageList. (!152)

  • Added cpl.core.Image.as_array() method to convert Images to numpy arrays. (!164)

  • Python bindings for cpl_image_reject_value added as cpl.core.Image.reject_value() (!168)

  • Added ability to retrieve rows from cpl.core.Table objects as Python dictionaries. (!167)

  • sorted methods for cpl.core.Bivector and cpl.core.Vector to return a sorted copy of the object while leaving the original unmodified.

Changed

  • Swapped image args to (y,x) in cpl.core.Image and cpl.core.Mask to be more consistant with pythonic representation. (!179)

  • Corrected docstrings at various places (!175)

  • Build system modernized: switch to a PEP-517 compliant build system using pyproject.toml together with the setuptools backend to build the extension. Use setup.cfg to specify all package meta data and use setup.py only for building the extension. (!166)

  • Remove custom commandline options passed to the build stage. This only works when setup.py is called directly, which is now obsolete. (!166)

  • Environment variables recognized by the build system are now namespace protected, e.g. RECIPE_DIR was replaced by PYCPL_RECIPE_DIR. (!166)

  • The cpl.core.Table __array__ now returns numpy masked arrays. (!174)

  • cpl.core.Table getter functions now return a tuple with the value and flag indicating if the returned value is invalid (!170)

  • Merged cpl.core.Image.get_xyz_window() methods with corresponding cpl.core.Image.get_xyz methods by adding optional window arguments. (!158)

  • Changes the functionality of dump functions all over making it homogeneous (!165)

  • cpl.core.ImageList.collapse_sigclip_create no longer requires a contribution map as input to be modified, it creates and returns a new contribution map. (!152)

  • Reworked cpl.core.Polynomial, cpl.core.Table and cpl.core.Vector and constructors. Overloaded constructors have been replaced with factory function (zeros, empty) similar to numpy classes. (!153)

  • Empty cpl.core.Bivector and cpl.core.Vector`s now constructed using `zeros static method similar to other classes (!177)

  • cpl.core.Bivector.interpolate_linear, cpl.core.Image.filter, cpl.core.Image.filter_mask, cpl.core.Image.hypot, cpl.core.Mask.threshold_image and cpl.core.Vector.correlate now return their results in a new PyCPL object instead of requiring a pre-allocated object to store the result in. (!177)

  • cpl.core.Image.fill_gaussian changed to create_guassian and create_gaussian_like, cpl.core.Image.fill_jacobian changed to create_jacobian, cpl.core.Image.fill_jacobian_polynomial changed to create_jacobian_polynomial and create_jacobian_polynomial_like, and cpl.core.fill_kernel_profile changed to kernel_profile. In each case the new methods now return their results in new PyCPL objects instead of requiring pre-allocated objects to store the result in. (!177)

  • cpl.core.Bivector.sort and cpl.core.Vector.sort now use an optional reverse boolean keyword to specify sort direction. (!177)

  • cpl.core.Table now returns an empty numpy array as the value when an invalid element of an array-valued column is accessed (was a single element numpy array containing None). (!182)

Fixed

  • Fixed the functionality of ‘cplcore.Image function’ set_either which accepts all data types. (!176)

  • Fixed handling of optional window to Image, ImageList and Mask dump functions. (!176)

  • Fixed support for cplcore.Type.ARRAY type columns of cpl.core.Table where the array type are strings. (!174)

  • Fixed CPL and pipeline web page links. (!154)

  • Fixed a typo in the user documentation. (!155)

  • Fixed tests failing due to Vector API change, see PIPE-10547 (!157)

  • Skip a test if numpy version < 1.20, as needed for PIPE-9418 (!157)

  • Fixed code style in most Python files (!157)

  • Fixed inconsistent behaviour of test_filter for PIPE-10547. (!164)

  • Fixed iterating on a cpl.core.Table raising TypeError for PIPE-10761. (!167)

  • Fixed cpl.core.Image.__array__() reshape bug, see PIPE-10547 (!177)

  • Fixed a file descriptor leak in test_dfs.py (see PIPE-10922) and avoid further leaks by adding context managers to all file I/O in the tests. (!181)

  • Linted Python code with Flake8. (!182)