pycontrails 0.41.0__tar.gz → 0.42.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pycontrails might be problematic. Click here for more details.
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.gitignore +1 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/CHANGELOG.md +23 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/CONTRIBUTING.md +0 -1
- {pycontrails-0.41.0/pycontrails.egg-info → pycontrails-0.42.0}/PKG-INFO +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/_static/pycontrails.bib +16 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/api.rst +1 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/conf.py +1 -0
- pycontrails-0.42.0/docs/examples/airports.ipynb +536 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/_version.py +2 -2
- pycontrails-0.42.0/pycontrails/core/airports.py +228 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/datalib.py +8 -4
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/fleet.py +13 -13
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/flight.py +311 -86
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/rgi_cython.c +104 -104
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/vector.py +63 -51
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/__init__.py +1 -1
- pycontrails-0.42.0/pycontrails/datalib/spire/__init__.py +19 -0
- pycontrails-0.42.0/pycontrails/datalib/spire/spire.py +739 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/wind_shear.py +2 -2
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/emissions.py +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/humidity_scaling.py +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/issr.py +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/pcr.py +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/sac.py +5 -5
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/geo.py +3 -2
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/jet.py +66 -113
- {pycontrails-0.41.0 → pycontrails-0.42.0/pycontrails.egg-info}/PKG-INFO +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails.egg-info/SOURCES.txt +7 -0
- pycontrails-0.42.0/tests/unit/static/flight-spire-data-cleaning.pq +0 -0
- pycontrails-0.42.0/tests/unit/test_airports.py +89 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cache.py +1 -1
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_datalib.py +6 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_flight.py +56 -2
- pycontrails-0.42.0/tests/unit/test_spire.py +93 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/pull_request_template.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/workflows/benchmark.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/workflows/docs.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/workflows/doctest.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/workflows/release.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.github/workflows/test.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.pre-commit-config.yaml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/.zenodo.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/LICENSE +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/Makefile +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/NOTICE +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/README.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/RELEASE.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/_static/css/style.css +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/_static/img/favicon.png +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/changelog.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/contributing.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/develop.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/ACCF.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/Cache.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/CoCiP.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/ECMWF.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/Flight.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/ISSR.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/Meteorology.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/SAC.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples/flight.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/examples.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/index.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/install.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/literature.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/tutorials/CoCiP.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/tutorials/flight.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/docs/tutorials.rst +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/cache.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/coordinates.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/fuel.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/interpolation.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/met.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/met_var.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/models.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/polygon.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/core/rgi_cython.pyx +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/common.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/era5.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/hres.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/ifs.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/ecmwf/variables.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/gfs/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/gfs/gfs.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/datalib/gfs/variables.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/ext/bada/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/ext/cirium/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/accf.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/aircraft_performance.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/cocip.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/cocip_params.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/cocip_uncertainty.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/contrail_properties.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/output/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/output/flight_summary.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/output/grid_cirrus.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/radiative_forcing.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/radiative_heating.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocip/wake_vortex.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocipgrid/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocipgrid/cocip_grid.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocipgrid/cocip_grid_params.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/cocipgrid/cocip_time_handling.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/black_carbon.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/ffm2.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/static/edb-gaseous-v28c-engines.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/emissions/static/edb-nvpm-v28c-engines.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/pcc.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/models/tau_cirrus.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/constants.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/thermo.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/physics/units.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/py.typed +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/iteration.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/json.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/synthetic_flight.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/temp.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails/utils/types.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails.egg-info/dependency_links.txt +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails.egg-info/requires.txt +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pycontrails.egg-info/top_level.txt +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/pyproject.toml +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/setup.cfg +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/setup.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/_deprecated.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/Makefile +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/README.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/benchmark.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/compare.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/data.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/output.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip/review.ipynb +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/cocip-fortran/README.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/north-atlantic-study/.gcloudignore +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/north-atlantic-study/README.md +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/north-atlantic-study/support.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/benchmark/north-atlantic-study/validate.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/fixtures/cocip-met.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/fixtures/cocip-met2.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/fixtures/ecmwf-met.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/fixtures/gfs-met.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/__init__.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/conftest.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/NOAA_Solar_Calculations_day.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-contrail-output.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-contrail-output2.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-flight-output.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-flight-output2.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-flight-statistics.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-output-contrail-edges.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/cocip-output-grid-cirrus-summary.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/flight-cocip2.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/flight-meridian.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/flight-metadata.json +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/flight.csv +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-accf-pl.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-accf-sl.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-ecmwf-pl.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-ecmwf-sl.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-era5-cocip1.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-era5-cocip2.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/met-gfs.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/polygon-bug.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/rad-era5-cocip1.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/rad-era5-cocip2.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/static/rad-gfs.nc +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_accf.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cocip.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cocip_grid.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cocip_grid_parity.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cocip_radiative_forcing.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_cocip_uncertainty.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_coordinates.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_dtypes.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_ecmwf.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_emissions.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_fleet.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_fuel.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_geo.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_gfs.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_grid_to_netcdf.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_humidity_scaling.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_init.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_interpolation.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_met.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_met_cache.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_models.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_pcc.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_polygons.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_sac_issr.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_tau_cirrus.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_thermo_sac.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_units.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_utils.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_vector.py +0 -0
- {pycontrails-0.41.0 → pycontrails-0.42.0}/tests/unit/test_zarr.py +0 -0
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
-
##
|
|
4
|
+
## v0.42.0
|
|
5
|
+
|
|
6
|
+
Phase 1 of the Spire datalib, which contains functions to identify unique flight trajectories from the raw Spire ADS-B data.
|
|
7
|
+
|
|
8
|
+
#### Features
|
|
9
|
+
|
|
10
|
+
- 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.
|
|
11
|
+
- Add a `pycontrails.datalib.spire.clean` function to remove and address erroneous waypoints in the raw Spire ADS-B data.
|
|
12
|
+
- Add a `pycontrails.datalib.spire.filter_altitude` function to remove noise in cruise altitude.
|
|
13
|
+
- Add a `pycontrails.datalib.spire.identify_flights` function to identify unique flight trajectories from ADS-B messages.
|
|
14
|
+
- Add a `pycontrails.datalib.spire.validate_trajectory` function to check the validity of the identified trajectories from ADS-B messages.
|
|
15
|
+
- Add a `FlightPhase` integer `Enum` in the `flight` module. This includes a new `level_flight` flight phase.
|
|
16
|
+
|
|
17
|
+
#### Internals
|
|
18
|
+
|
|
19
|
+
- Add unit tests providing examples to identify unique flights.
|
|
20
|
+
- Rename `flight._dt_waypoints` -> `flight.segment_duration`.
|
|
21
|
+
- Move `jet.rate_of_climb_descent` -> `flight.segment_rocd`.
|
|
22
|
+
- Move `jet.identify_phase_of_flight` -> `flight.segment_phase`.
|
|
23
|
+
- Update `FlightPhase` to be a dictionary enumeration of flight phases.
|
|
24
|
+
- Add references to [`traffic` library](https://traffic-viz.github.io/).
|
|
25
|
+
|
|
26
|
+
## v0.41.0
|
|
5
27
|
|
|
6
28
|
Improve polygon algorithms.
|
|
7
29
|
|
|
@@ -132,7 +132,6 @@ Wherever possible, we adhere to the [NumPy docstring conventions](https://numpyd
|
|
|
132
132
|
The following links are good references for writing *numpy* docstrings:
|
|
133
133
|
|
|
134
134
|
- [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
135
|
-
- [napolean example numpy docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html)
|
|
136
135
|
- [pandas docstring guide](https://pandas.pydata.org/docs/development/contributing_docstring.html)
|
|
137
136
|
- [scipy docstring guideline](https://docs.scipy.org/doc//scipy/dev/contributor/rendering_documentation.html#documentation-guidelines)
|
|
138
137
|
|
|
@@ -44,6 +44,12 @@
|
|
|
44
44
|
langid = {english}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
@misc{CalculateDistanceBearing,
|
|
48
|
+
title = {Calculate Distance and Bearing between Two {{Latitude}}/{{Longitude}} Points Using Haversine Formula in {{JavaScript}}},
|
|
49
|
+
urldate = {2023-04-12},
|
|
50
|
+
howpublished = {https://www.movable-type.co.uk/scripts/latlong.html}
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
@article{celikel2001forecasting,
|
|
48
54
|
title = {Forecasting Civil Aviation Fuel Burn and Emissions in {{Europe}}},
|
|
49
55
|
author = {Celikel, A and Jelinek, F},
|
|
@@ -234,6 +240,16 @@
|
|
|
234
240
|
langid = {english}
|
|
235
241
|
}
|
|
236
242
|
|
|
243
|
+
@misc{megginsonOpendataDownloadsOurAirports2023,
|
|
244
|
+
title = {Open-Data Downloads for {{OurAirports}}},
|
|
245
|
+
author = {Megginson, David},
|
|
246
|
+
year = {2023},
|
|
247
|
+
month = apr,
|
|
248
|
+
urldate = {2023-04-12},
|
|
249
|
+
abstract = {Open-data downloads for OurAirports.com},
|
|
250
|
+
copyright = {Unlicense}
|
|
251
|
+
}
|
|
252
|
+
|
|
237
253
|
@misc{noaaSolarCalculationDetails,
|
|
238
254
|
title = {Solar {{Calculation Details}}},
|
|
239
255
|
author = {NOAA},
|
|
@@ -85,6 +85,7 @@ intersphinx_mapping = {
|
|
|
85
85
|
"sklearn": ("https://scikit-learn.org/stable/", None),
|
|
86
86
|
"xarray": ("https://docs.xarray.dev/en/stable/", None),
|
|
87
87
|
"zarr": ("https://zarr.readthedocs.io/en/stable/", None),
|
|
88
|
+
"traffic": ("https://traffic-viz.github.io/", None),
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
# Display todos by setting to True
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "f5306527-306c-4b54-b4cc-6a260858df56",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"# Airports\n",
|
|
9
|
+
"\n",
|
|
10
|
+
"The `pycontrails.core.airports` module provides access to global airport data and helper functions for working with airport data.\n",
|
|
11
|
+
"\n",
|
|
12
|
+
"Airport data is loaded at runtime from [Our Airports](https://ourairports.com/) from a fork of the [ourairports-data repository](https://github.com/davidmegginson/ourairports-data)."
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"cell_type": "code",
|
|
17
|
+
"execution_count": 1,
|
|
18
|
+
"id": "1e9a7de3-bc00-4e2e-9b42-83f3b257b5e3",
|
|
19
|
+
"metadata": {},
|
|
20
|
+
"outputs": [],
|
|
21
|
+
"source": [
|
|
22
|
+
"from pycontrails.core import airports"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"cell_type": "markdown",
|
|
27
|
+
"id": "ef916438-09f8-4f2e-8933-7df646deb714",
|
|
28
|
+
"metadata": {},
|
|
29
|
+
"source": [
|
|
30
|
+
"## Global airport database\n",
|
|
31
|
+
"\n",
|
|
32
|
+
"The `global_airport_database` method downloads and caches airport data."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"cell_type": "code",
|
|
37
|
+
"execution_count": 2,
|
|
38
|
+
"id": "cba4cbee-7521-4bde-b063-8aff0e2f5417",
|
|
39
|
+
"metadata": {},
|
|
40
|
+
"outputs": [
|
|
41
|
+
{
|
|
42
|
+
"data": {
|
|
43
|
+
"text/html": [
|
|
44
|
+
"<div>\n",
|
|
45
|
+
"<style scoped>\n",
|
|
46
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
47
|
+
" vertical-align: middle;\n",
|
|
48
|
+
" }\n",
|
|
49
|
+
"\n",
|
|
50
|
+
" .dataframe tbody tr th {\n",
|
|
51
|
+
" vertical-align: top;\n",
|
|
52
|
+
" }\n",
|
|
53
|
+
"\n",
|
|
54
|
+
" .dataframe thead th {\n",
|
|
55
|
+
" text-align: right;\n",
|
|
56
|
+
" }\n",
|
|
57
|
+
"</style>\n",
|
|
58
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
59
|
+
" <thead>\n",
|
|
60
|
+
" <tr style=\"text-align: right;\">\n",
|
|
61
|
+
" <th></th>\n",
|
|
62
|
+
" <th>type</th>\n",
|
|
63
|
+
" <th>name</th>\n",
|
|
64
|
+
" <th>latitude</th>\n",
|
|
65
|
+
" <th>longitude</th>\n",
|
|
66
|
+
" <th>elevation_ft</th>\n",
|
|
67
|
+
" <th>iso_country</th>\n",
|
|
68
|
+
" <th>iso_region</th>\n",
|
|
69
|
+
" <th>municipality</th>\n",
|
|
70
|
+
" <th>scheduled_service</th>\n",
|
|
71
|
+
" <th>icao_code</th>\n",
|
|
72
|
+
" <th>iata_code</th>\n",
|
|
73
|
+
" <th>elevation_m</th>\n",
|
|
74
|
+
" </tr>\n",
|
|
75
|
+
" </thead>\n",
|
|
76
|
+
" <tbody>\n",
|
|
77
|
+
" <tr>\n",
|
|
78
|
+
" <th>0</th>\n",
|
|
79
|
+
" <td>small_airport</td>\n",
|
|
80
|
+
" <td>Rothera Point Airport</td>\n",
|
|
81
|
+
" <td>-67.566941</td>\n",
|
|
82
|
+
" <td>-68.126993</td>\n",
|
|
83
|
+
" <td>0.0</td>\n",
|
|
84
|
+
" <td>AQ</td>\n",
|
|
85
|
+
" <td>AQ-U-A</td>\n",
|
|
86
|
+
" <td>Rothera Point</td>\n",
|
|
87
|
+
" <td>no</td>\n",
|
|
88
|
+
" <td>AAXX</td>\n",
|
|
89
|
+
" <td>NaN</td>\n",
|
|
90
|
+
" <td>0.0000</td>\n",
|
|
91
|
+
" </tr>\n",
|
|
92
|
+
" <tr>\n",
|
|
93
|
+
" <th>1</th>\n",
|
|
94
|
+
" <td>small_airport</td>\n",
|
|
95
|
+
" <td>Angeles City Flying Club</td>\n",
|
|
96
|
+
" <td>15.254326</td>\n",
|
|
97
|
+
" <td>120.677772</td>\n",
|
|
98
|
+
" <td>100.0</td>\n",
|
|
99
|
+
" <td>PH</td>\n",
|
|
100
|
+
" <td>PH-U-A</td>\n",
|
|
101
|
+
" <td>MG</td>\n",
|
|
102
|
+
" <td>no</td>\n",
|
|
103
|
+
" <td>ACFC</td>\n",
|
|
104
|
+
" <td>AFC</td>\n",
|
|
105
|
+
" <td>30.4800</td>\n",
|
|
106
|
+
" </tr>\n",
|
|
107
|
+
" <tr>\n",
|
|
108
|
+
" <th>2</th>\n",
|
|
109
|
+
" <td>small_airport</td>\n",
|
|
110
|
+
" <td>Afutara Aerodrome</td>\n",
|
|
111
|
+
" <td>-9.191389</td>\n",
|
|
112
|
+
" <td>160.948611</td>\n",
|
|
113
|
+
" <td>23.0</td>\n",
|
|
114
|
+
" <td>SB</td>\n",
|
|
115
|
+
" <td>SB-ML</td>\n",
|
|
116
|
+
" <td>Bila</td>\n",
|
|
117
|
+
" <td>yes</td>\n",
|
|
118
|
+
" <td>AGAF</td>\n",
|
|
119
|
+
" <td>AFT</td>\n",
|
|
120
|
+
" <td>7.0104</td>\n",
|
|
121
|
+
" </tr>\n",
|
|
122
|
+
" <tr>\n",
|
|
123
|
+
" <th>3</th>\n",
|
|
124
|
+
" <td>small_airport</td>\n",
|
|
125
|
+
" <td>Ulawa Airport</td>\n",
|
|
126
|
+
" <td>-9.860544</td>\n",
|
|
127
|
+
" <td>161.979547</td>\n",
|
|
128
|
+
" <td>40.0</td>\n",
|
|
129
|
+
" <td>SB</td>\n",
|
|
130
|
+
" <td>SB-MK</td>\n",
|
|
131
|
+
" <td>Arona</td>\n",
|
|
132
|
+
" <td>no</td>\n",
|
|
133
|
+
" <td>AGAR</td>\n",
|
|
134
|
+
" <td>RNA</td>\n",
|
|
135
|
+
" <td>12.1920</td>\n",
|
|
136
|
+
" </tr>\n",
|
|
137
|
+
" <tr>\n",
|
|
138
|
+
" <th>4</th>\n",
|
|
139
|
+
" <td>small_airport</td>\n",
|
|
140
|
+
" <td>Uru Harbour Airport</td>\n",
|
|
141
|
+
" <td>-8.873330</td>\n",
|
|
142
|
+
" <td>161.011002</td>\n",
|
|
143
|
+
" <td>0.0</td>\n",
|
|
144
|
+
" <td>SB</td>\n",
|
|
145
|
+
" <td>SB-ML</td>\n",
|
|
146
|
+
" <td>Atoifi</td>\n",
|
|
147
|
+
" <td>yes</td>\n",
|
|
148
|
+
" <td>AGAT</td>\n",
|
|
149
|
+
" <td>ATD</td>\n",
|
|
150
|
+
" <td>0.0000</td>\n",
|
|
151
|
+
" </tr>\n",
|
|
152
|
+
" </tbody>\n",
|
|
153
|
+
"</table>\n",
|
|
154
|
+
"</div>"
|
|
155
|
+
],
|
|
156
|
+
"text/plain": [
|
|
157
|
+
" type name latitude longitude \\\n",
|
|
158
|
+
"0 small_airport Rothera Point Airport -67.566941 -68.126993 \n",
|
|
159
|
+
"1 small_airport Angeles City Flying Club 15.254326 120.677772 \n",
|
|
160
|
+
"2 small_airport Afutara Aerodrome -9.191389 160.948611 \n",
|
|
161
|
+
"3 small_airport Ulawa Airport -9.860544 161.979547 \n",
|
|
162
|
+
"4 small_airport Uru Harbour Airport -8.873330 161.011002 \n",
|
|
163
|
+
"\n",
|
|
164
|
+
" elevation_ft iso_country iso_region municipality scheduled_service \\\n",
|
|
165
|
+
"0 0.0 AQ AQ-U-A Rothera Point no \n",
|
|
166
|
+
"1 100.0 PH PH-U-A MG no \n",
|
|
167
|
+
"2 23.0 SB SB-ML Bila yes \n",
|
|
168
|
+
"3 40.0 SB SB-MK Arona no \n",
|
|
169
|
+
"4 0.0 SB SB-ML Atoifi yes \n",
|
|
170
|
+
"\n",
|
|
171
|
+
" icao_code iata_code elevation_m \n",
|
|
172
|
+
"0 AAXX NaN 0.0000 \n",
|
|
173
|
+
"1 ACFC AFC 30.4800 \n",
|
|
174
|
+
"2 AGAF AFT 7.0104 \n",
|
|
175
|
+
"3 AGAR RNA 12.1920 \n",
|
|
176
|
+
"4 AGAT ATD 0.0000 "
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"execution_count": 2,
|
|
180
|
+
"metadata": {},
|
|
181
|
+
"output_type": "execute_result"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"source": [
|
|
185
|
+
"db = airports.global_airport_database()\n",
|
|
186
|
+
"db.head()"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"cell_type": "markdown",
|
|
191
|
+
"id": "bb687ead-8730-44a4-b0bf-c76c92100cbb",
|
|
192
|
+
"metadata": {},
|
|
193
|
+
"source": [
|
|
194
|
+
"You can override the cache location by passing in a pycontrails [CacheStore](https://py.contrails.org/api.html#cache) to the `cachestore` argument:"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"cell_type": "code",
|
|
199
|
+
"execution_count": 3,
|
|
200
|
+
"id": "d590e371-e385-4920-becc-0d130c0b93bf",
|
|
201
|
+
"metadata": {},
|
|
202
|
+
"outputs": [],
|
|
203
|
+
"source": [
|
|
204
|
+
"from pycontrails import DiskCacheStore"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"cell_type": "code",
|
|
209
|
+
"execution_count": 4,
|
|
210
|
+
"id": "7d597179-9ac6-41e9-a1d9-f7884196bd22",
|
|
211
|
+
"metadata": {},
|
|
212
|
+
"outputs": [
|
|
213
|
+
{
|
|
214
|
+
"data": {
|
|
215
|
+
"text/html": [
|
|
216
|
+
"<div>\n",
|
|
217
|
+
"<style scoped>\n",
|
|
218
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
219
|
+
" vertical-align: middle;\n",
|
|
220
|
+
" }\n",
|
|
221
|
+
"\n",
|
|
222
|
+
" .dataframe tbody tr th {\n",
|
|
223
|
+
" vertical-align: top;\n",
|
|
224
|
+
" }\n",
|
|
225
|
+
"\n",
|
|
226
|
+
" .dataframe thead th {\n",
|
|
227
|
+
" text-align: right;\n",
|
|
228
|
+
" }\n",
|
|
229
|
+
"</style>\n",
|
|
230
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
231
|
+
" <thead>\n",
|
|
232
|
+
" <tr style=\"text-align: right;\">\n",
|
|
233
|
+
" <th></th>\n",
|
|
234
|
+
" <th>type</th>\n",
|
|
235
|
+
" <th>name</th>\n",
|
|
236
|
+
" <th>latitude</th>\n",
|
|
237
|
+
" <th>longitude</th>\n",
|
|
238
|
+
" <th>elevation_ft</th>\n",
|
|
239
|
+
" <th>iso_country</th>\n",
|
|
240
|
+
" <th>iso_region</th>\n",
|
|
241
|
+
" <th>municipality</th>\n",
|
|
242
|
+
" <th>scheduled_service</th>\n",
|
|
243
|
+
" <th>icao_code</th>\n",
|
|
244
|
+
" <th>iata_code</th>\n",
|
|
245
|
+
" <th>elevation_m</th>\n",
|
|
246
|
+
" </tr>\n",
|
|
247
|
+
" </thead>\n",
|
|
248
|
+
" <tbody>\n",
|
|
249
|
+
" <tr>\n",
|
|
250
|
+
" <th>0</th>\n",
|
|
251
|
+
" <td>small_airport</td>\n",
|
|
252
|
+
" <td>Rothera Point Airport</td>\n",
|
|
253
|
+
" <td>-67.566941</td>\n",
|
|
254
|
+
" <td>-68.126993</td>\n",
|
|
255
|
+
" <td>0.0</td>\n",
|
|
256
|
+
" <td>AQ</td>\n",
|
|
257
|
+
" <td>AQ-U-A</td>\n",
|
|
258
|
+
" <td>Rothera Point</td>\n",
|
|
259
|
+
" <td>no</td>\n",
|
|
260
|
+
" <td>AAXX</td>\n",
|
|
261
|
+
" <td>NaN</td>\n",
|
|
262
|
+
" <td>0.0000</td>\n",
|
|
263
|
+
" </tr>\n",
|
|
264
|
+
" <tr>\n",
|
|
265
|
+
" <th>1</th>\n",
|
|
266
|
+
" <td>small_airport</td>\n",
|
|
267
|
+
" <td>Angeles City Flying Club</td>\n",
|
|
268
|
+
" <td>15.254326</td>\n",
|
|
269
|
+
" <td>120.677772</td>\n",
|
|
270
|
+
" <td>100.0</td>\n",
|
|
271
|
+
" <td>PH</td>\n",
|
|
272
|
+
" <td>PH-U-A</td>\n",
|
|
273
|
+
" <td>MG</td>\n",
|
|
274
|
+
" <td>no</td>\n",
|
|
275
|
+
" <td>ACFC</td>\n",
|
|
276
|
+
" <td>AFC</td>\n",
|
|
277
|
+
" <td>30.4800</td>\n",
|
|
278
|
+
" </tr>\n",
|
|
279
|
+
" <tr>\n",
|
|
280
|
+
" <th>2</th>\n",
|
|
281
|
+
" <td>small_airport</td>\n",
|
|
282
|
+
" <td>Afutara Aerodrome</td>\n",
|
|
283
|
+
" <td>-9.191389</td>\n",
|
|
284
|
+
" <td>160.948611</td>\n",
|
|
285
|
+
" <td>23.0</td>\n",
|
|
286
|
+
" <td>SB</td>\n",
|
|
287
|
+
" <td>SB-ML</td>\n",
|
|
288
|
+
" <td>Bila</td>\n",
|
|
289
|
+
" <td>yes</td>\n",
|
|
290
|
+
" <td>AGAF</td>\n",
|
|
291
|
+
" <td>AFT</td>\n",
|
|
292
|
+
" <td>7.0104</td>\n",
|
|
293
|
+
" </tr>\n",
|
|
294
|
+
" <tr>\n",
|
|
295
|
+
" <th>3</th>\n",
|
|
296
|
+
" <td>small_airport</td>\n",
|
|
297
|
+
" <td>Ulawa Airport</td>\n",
|
|
298
|
+
" <td>-9.860544</td>\n",
|
|
299
|
+
" <td>161.979547</td>\n",
|
|
300
|
+
" <td>40.0</td>\n",
|
|
301
|
+
" <td>SB</td>\n",
|
|
302
|
+
" <td>SB-MK</td>\n",
|
|
303
|
+
" <td>Arona</td>\n",
|
|
304
|
+
" <td>no</td>\n",
|
|
305
|
+
" <td>AGAR</td>\n",
|
|
306
|
+
" <td>RNA</td>\n",
|
|
307
|
+
" <td>12.1920</td>\n",
|
|
308
|
+
" </tr>\n",
|
|
309
|
+
" <tr>\n",
|
|
310
|
+
" <th>4</th>\n",
|
|
311
|
+
" <td>small_airport</td>\n",
|
|
312
|
+
" <td>Uru Harbour Airport</td>\n",
|
|
313
|
+
" <td>-8.873330</td>\n",
|
|
314
|
+
" <td>161.011002</td>\n",
|
|
315
|
+
" <td>0.0</td>\n",
|
|
316
|
+
" <td>SB</td>\n",
|
|
317
|
+
" <td>SB-ML</td>\n",
|
|
318
|
+
" <td>Atoifi</td>\n",
|
|
319
|
+
" <td>yes</td>\n",
|
|
320
|
+
" <td>AGAT</td>\n",
|
|
321
|
+
" <td>ATD</td>\n",
|
|
322
|
+
" <td>0.0000</td>\n",
|
|
323
|
+
" </tr>\n",
|
|
324
|
+
" </tbody>\n",
|
|
325
|
+
"</table>\n",
|
|
326
|
+
"</div>"
|
|
327
|
+
],
|
|
328
|
+
"text/plain": [
|
|
329
|
+
" type name latitude longitude \\\n",
|
|
330
|
+
"0 small_airport Rothera Point Airport -67.566941 -68.126993 \n",
|
|
331
|
+
"1 small_airport Angeles City Flying Club 15.254326 120.677772 \n",
|
|
332
|
+
"2 small_airport Afutara Aerodrome -9.191389 160.948611 \n",
|
|
333
|
+
"3 small_airport Ulawa Airport -9.860544 161.979547 \n",
|
|
334
|
+
"4 small_airport Uru Harbour Airport -8.873330 161.011002 \n",
|
|
335
|
+
"\n",
|
|
336
|
+
" elevation_ft iso_country iso_region municipality scheduled_service \\\n",
|
|
337
|
+
"0 0.0 AQ AQ-U-A Rothera Point no \n",
|
|
338
|
+
"1 100.0 PH PH-U-A MG no \n",
|
|
339
|
+
"2 23.0 SB SB-ML Bila yes \n",
|
|
340
|
+
"3 40.0 SB SB-MK Arona no \n",
|
|
341
|
+
"4 0.0 SB SB-ML Atoifi yes \n",
|
|
342
|
+
"\n",
|
|
343
|
+
" icao_code iata_code elevation_m \n",
|
|
344
|
+
"0 AAXX NaN 0.0000 \n",
|
|
345
|
+
"1 ACFC AFC 30.4800 \n",
|
|
346
|
+
"2 AGAF AFT 7.0104 \n",
|
|
347
|
+
"3 AGAR RNA 12.1920 \n",
|
|
348
|
+
"4 AGAT ATD 0.0000 "
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"execution_count": 4,
|
|
352
|
+
"metadata": {},
|
|
353
|
+
"output_type": "execute_result"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"source": [
|
|
357
|
+
"cache = DiskCacheStore(cache_dir=\"airports\")\n",
|
|
358
|
+
"db = airports.global_airport_database(cachestore=cache)\n",
|
|
359
|
+
"db.head()"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"cell_type": "markdown",
|
|
364
|
+
"id": "56351b1c-03b7-4876-8cb0-c4848b98a479",
|
|
365
|
+
"metadata": {},
|
|
366
|
+
"source": [
|
|
367
|
+
"You can force an update of the cached airports by passing in `update_cache=True`:"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"cell_type": "code",
|
|
372
|
+
"execution_count": 5,
|
|
373
|
+
"id": "4ca1ab6c-d8b3-4df0-b883-46a5cc2fe0b6",
|
|
374
|
+
"metadata": {},
|
|
375
|
+
"outputs": [],
|
|
376
|
+
"source": [
|
|
377
|
+
"# redownloads airport database\n",
|
|
378
|
+
"db = airports.global_airport_database(update_cache=True)"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"cell_type": "markdown",
|
|
383
|
+
"id": "74202780-184b-44e7-b6fc-7763468e5506",
|
|
384
|
+
"metadata": {},
|
|
385
|
+
"source": [
|
|
386
|
+
"## Find nearest airport\n",
|
|
387
|
+
"\n",
|
|
388
|
+
"Find the nearest airport to waypoint location"
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"cell_type": "code",
|
|
393
|
+
"execution_count": 6,
|
|
394
|
+
"id": "a893b9e7-8577-4feb-939f-4a9fea56ad8b",
|
|
395
|
+
"metadata": {},
|
|
396
|
+
"outputs": [
|
|
397
|
+
{
|
|
398
|
+
"data": {
|
|
399
|
+
"text/plain": [
|
|
400
|
+
"'KBOS'"
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"execution_count": 6,
|
|
404
|
+
"metadata": {},
|
|
405
|
+
"output_type": "execute_result"
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
"source": [
|
|
409
|
+
"# a point in the Massachusetts bay close to BOS\n",
|
|
410
|
+
"longitude = -70.842554\n",
|
|
411
|
+
"latitude = 42.387466\n",
|
|
412
|
+
"altitude = 1000\n",
|
|
413
|
+
"\n",
|
|
414
|
+
"# open the airport database\n",
|
|
415
|
+
"db = airports.global_airport_database()\n",
|
|
416
|
+
"\n",
|
|
417
|
+
"# returns the icao code of the closest airport\n",
|
|
418
|
+
"airports.find_nearest_airport(db, longitude, latitude, altitude)"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"cell_type": "markdown",
|
|
423
|
+
"id": "39ed3d7e-8829-4289-a7eb-a57324c0c1f3",
|
|
424
|
+
"metadata": {},
|
|
425
|
+
"source": [
|
|
426
|
+
"The function returns `None` if no airport is found within the default bounding box (2°)"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"cell_type": "code",
|
|
431
|
+
"execution_count": 7,
|
|
432
|
+
"id": "8aa654e2-2864-4679-b89f-f8c56a9b7648",
|
|
433
|
+
"metadata": {},
|
|
434
|
+
"outputs": [],
|
|
435
|
+
"source": [
|
|
436
|
+
"# Somewhere in the atlantic\n",
|
|
437
|
+
"longitude = -50\n",
|
|
438
|
+
"latitude = 35\n",
|
|
439
|
+
"altitude = 1000\n",
|
|
440
|
+
"\n",
|
|
441
|
+
"airports.find_nearest_airport(db, longitude, latitude, altitude)"
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"cell_type": "markdown",
|
|
446
|
+
"id": "7da18969-53eb-4395-bbeb-48ab72142743",
|
|
447
|
+
"metadata": {},
|
|
448
|
+
"source": [
|
|
449
|
+
"Pass in the `bbox` parameter (in units of °) to increase the search distance"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"cell_type": "code",
|
|
454
|
+
"execution_count": 8,
|
|
455
|
+
"id": "d9570a46-d18a-421b-9694-c050df9a2dfe",
|
|
456
|
+
"metadata": {},
|
|
457
|
+
"outputs": [
|
|
458
|
+
{
|
|
459
|
+
"data": {
|
|
460
|
+
"text/plain": [
|
|
461
|
+
"'CYYT'"
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
"execution_count": 8,
|
|
465
|
+
"metadata": {},
|
|
466
|
+
"output_type": "execute_result"
|
|
467
|
+
}
|
|
468
|
+
],
|
|
469
|
+
"source": [
|
|
470
|
+
"airports.find_nearest_airport(db, longitude, latitude, altitude, bbox=20)"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"cell_type": "markdown",
|
|
475
|
+
"id": "9cdcf9dc-89db-49c0-969f-0d8c36464144",
|
|
476
|
+
"metadata": {},
|
|
477
|
+
"source": [
|
|
478
|
+
"## Find distance to airports\n",
|
|
479
|
+
"\n",
|
|
480
|
+
"Calculate the haversine distance (in `m`) to all input airports"
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"cell_type": "code",
|
|
485
|
+
"execution_count": 9,
|
|
486
|
+
"id": "9591d842-866c-4e69-9453-4001c3974184",
|
|
487
|
+
"metadata": {},
|
|
488
|
+
"outputs": [
|
|
489
|
+
{
|
|
490
|
+
"data": {
|
|
491
|
+
"text/plain": [
|
|
492
|
+
"array([ 13616.14944594, 312341.96236736])"
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
"execution_count": 9,
|
|
496
|
+
"metadata": {},
|
|
497
|
+
"output_type": "execute_result"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
"source": [
|
|
501
|
+
"db = airports.global_airport_database()\n",
|
|
502
|
+
"\n",
|
|
503
|
+
"# select BOS and JFK\n",
|
|
504
|
+
"subset = db[db[\"iata_code\"].isin([\"BOS\", \"JFK\"])]\n",
|
|
505
|
+
"\n",
|
|
506
|
+
"# Find distance to a point in the massachusetts bay close to BOS\n",
|
|
507
|
+
"longitude = -70.842554\n",
|
|
508
|
+
"latitude = 42.387466\n",
|
|
509
|
+
"altitude = 500\n",
|
|
510
|
+
"\n",
|
|
511
|
+
"airports.distance_to_airports(subset, longitude, latitude, altitude)"
|
|
512
|
+
]
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"metadata": {
|
|
516
|
+
"kernelspec": {
|
|
517
|
+
"display_name": "Python 3 (ipykernel)",
|
|
518
|
+
"language": "python",
|
|
519
|
+
"name": "python3"
|
|
520
|
+
},
|
|
521
|
+
"language_info": {
|
|
522
|
+
"codemirror_mode": {
|
|
523
|
+
"name": "ipython",
|
|
524
|
+
"version": 3
|
|
525
|
+
},
|
|
526
|
+
"file_extension": ".py",
|
|
527
|
+
"mimetype": "text/x-python",
|
|
528
|
+
"name": "python",
|
|
529
|
+
"nbconvert_exporter": "python",
|
|
530
|
+
"pygments_lexer": "ipython3",
|
|
531
|
+
"version": "3.10.8"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"nbformat": 4,
|
|
535
|
+
"nbformat_minor": 5
|
|
536
|
+
}
|