Skip to content

Releases: contrailcirrus/pycontrails

v0.42.0

28 Apr 20:18
Compare
Choose a tag to compare

Phase 1 of the Spire datalib, which contains functions to identify unique flight trajectories from the raw Spire ADS-B data.

Features

  • Add a pycontrails.core.airport module to read and process the global airport database, which can be used to identify the nearest airport to a given coordinate.
  • Add a pycontrails.datalib.spire.clean function to remove and address erroneous waypoints in the raw Spire ADS-B data.
  • Add a pycontrails.datalib.spire.filter_altitude function to remove noise in cruise altitude.
  • Add a pycontrails.datalib.spire.identify_flights function to identify unique flight trajectories from ADS-B messages.
  • Add a pycontrails.datalib.spire.validate_trajectory function to check the validity of the identified trajectories from ADS-B messages.
  • Add a FlightPhase integer Enum in the flight module. This includes a new level_flight flight phase.

Internals

  • Add unit tests providing examples to identify unique flights.
  • Rename flight._dt_waypoints -> flight.segment_duration.
  • Move jet.rate_of_climb_descent -> flight.segment_rocd.
  • Move jet.identify_phase_of_flight -> flight.segment_phase.
  • Update FlightPhase to be a dictionary enumeration of flight phases.
  • Add references to traffic library.

v0.41.0

27 Apr 13:15
Compare
Choose a tag to compare

Improve polygon algorithms.

Features

  • Rewrite the polygon module to run computation with opencv in place of scikit-image for finding contours. This change improves the algorithm runtime and fixes some previous unstable behavior in finding nested contours. For an introduction to the methodology, see the OpenCV contour tutorial.

Breaking changes

  • Completely rewrite the polygon module. Replace the "main" public function polygon.find_contours_to_depth with polygon.find_multipolygon. Replace the polygon.contour_to_lat_lon function with polygon.multipolygon_to_geojson. Return shapely objects when convenient to do so.
  • Convert continuous data to binary for polygon computation.
  • Remove parameters min_area_to_iterate and depth in the MetDataArray.to_polygon_feature method. The depth parameter has been replaced by the boolean interiors parameter. Add a properties parameter for adding properties to the Polygon and MultiPolygon features. The max_area and epsilon parameters are now expressed in terms of latitude-longitude degrees.

Internals

  • Add opencv-python-headless>=4.5 as an optional "vis" dependency. Some flavor of opencv is required for the updated polygon algorithms.

v0.40.1

16 Apr 23:26
Compare
Choose a tag to compare

Fixes

  • Use oldest-supported-numpy for building pycontrails wheels. This allows pycontrails to be compatible with environments that use old versions of numpy. The pycontrails v0.40.0 wheels are not compatible with numpy 1.22.
  • Fix a unit test (test_dtypes.py::test_issr_sac_grid_output) that occasionally hangs.

v0.40.0

14 Apr 21:22
Compare
Choose a tag to compare

v0.40.0

Support scipy 1.10, improve interpolation performance, and fix many windows issues.

Features

  • Improve interpolation performance by cythonizing linear interpolation. This extends the approach taken in scipy 1.10. The pycontrails cython routines allow for both float64 and float32 grids via cython fused types (the current scipy implementation assumes float64). In addition, interpolation up to dimension 4 is supported (the scipy implementation supports dimension 1 and 2).
  • Officially support scipy 1.10.
  • Officially test on windows in the GitHub Actions CI.
  • Build custom wheels for python 3.9, 3.10, and 3.11 for the following platforms:
    • Linux (x86_64)
    • macOS (arm64 and x86_64)
    • Windows (x86_64)

Breaking changes

  • Change MetDataset and MetDataArray conventions: underlying dimension coordinates are automatically promoted to float64.
  • Change how datetime arrays are converted to floating values for interpolation. The new approach introduces small differences compared with the previous implementation. These differences are significant enough to see relative differences in CoCiP predictions on the order of 1e-4.

Fixes

  • Unit tests no longer raise errors when the pycontrails-bada package is not installed. Instead, some tests are skipped.
  • Fix many numpy casting issues encountered on windows.
  • Fix temp file issues encountered on windows.
  • Officially support changes in xarray 2023.04 and pandas 2.0.

Internals

  • Make the interpolation module more aligned with scipy 1.10 enhancements to the RegularGridInterpolator. In particular, grid coordinates now must be float64.
  • Use cibuildwheel to build wheels for Linux, macOS (arm64 and x86_64), and Windows on release in Github Actions. Allow this workflow to be triggered manually to test the release process without actually publishing to PyPI.
  • Simplify interpolation with pre-computed indices (invoked with the model parameter interpolation_use_indices) via a RGIArtifacts interface.
  • Overhaul much of the interpolation module to improve performance.
  • Slight performance enhancements to the met module.

v0.39.6

13 Apr 11:35
Compare
Choose a tag to compare

v0.39.6

Features

  • Add geo.azimuth and geo.segment_azimuth functions to calculate the azimuth
    between coordinates.
    Azimuth is the angle between coordinates relative to true north on the range [0, 360].

Fixes

  • Fix edge case in polygon algorithm by utilizing the fully_connected parameter in measure.find_contours. This update leads to slight changes in interior contours in some cases.
  • Fix hard-coded POSIX path in conftest.py for windows compatibility.
  • Address PermissionError raised by shutil.copy when the destination file is open in another thread. The copy is skipped and a warning is logged.
  • Fix some unit tests in test_vector.py and test_ecmwf.py for windows compatibility. There are still a few tests that fail on windows (unrelated to changes in this release) that will be fixed in v0.40.0.
  • Allow cachestore=None to skip caching in ERA5, HRES, and GFS interfaces. Previously a default DiskCacheStore was created even when cachestore=None. By default, caching is still enabled.

Internals

  • Clean up geo module docstrings.
  • Add Wikipedia reference for Azimuth.
  • Convert MetBase._load to from a class method to a function.

v0.39.5

28 Mar 20:10
Compare
Choose a tag to compare

Fixes

  • Fix docs/examples/CoCiP.ipynb example demonstrating aircraft performance integration
  • Fix unit test caused by breaking change in pyproj 3.5.0

Internals

  • Add additional Zenodo metadata
  • Execute notebook examples in Docs Action

v0.39.4

28 Mar 04:23
Compare
Choose a tag to compare

Internals

v0.39.3

27 Mar 17:11
Compare
Choose a tag to compare

Full Changelog: v0.39.2...v0.39.3

v0.39.2

27 Mar 15:47
Compare
Choose a tag to compare

Full Changelog: v0.39.1...v0.39.2

v0.39.1

27 Mar 14:50
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.39.0...v0.39.1