gafa 1.3.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.
Files changed (82) hide show
  1. gafa-1.3.0/.gitignore +49 -0
  2. gafa-1.3.0/.gitlab-ci.yml +97 -0
  3. gafa-1.3.0/CHANGELOG.md +97 -0
  4. gafa-1.3.0/LICENSE-Apache-2.0.txt +202 -0
  5. gafa-1.3.0/LICENSE-ESA-PL-Permissive-2.5.txt +259 -0
  6. gafa-1.3.0/PKG-INFO +373 -0
  7. gafa-1.3.0/README.md +333 -0
  8. gafa-1.3.0/docs/bistatic_doppler.rst +77 -0
  9. gafa-1.3.0/examples/bistatic_ptr_demo.ipynb +573 -0
  10. gafa-1.3.0/examples/gafa_config.toml.example +28 -0
  11. gafa-1.3.0/examples/gafa_roi_demo.ipynb +461 -0
  12. gafa-1.3.0/examples/s1_ew_demo.ipynb +208 -0
  13. gafa-1.3.0/examples/s1_iw_demo.ipynb +199 -0
  14. gafa-1.3.0/examples/s1_iw_ipf.py +219 -0
  15. gafa-1.3.0/examples/s1_iw_ipf.toml +44 -0
  16. gafa-1.3.0/examples/tdbp_gafa_geosar_demo.ipynb +500 -0
  17. gafa-1.3.0/getting-started.md +78 -0
  18. gafa-1.3.0/pyproject.toml +75 -0
  19. gafa-1.3.0/ruff.toml +13 -0
  20. gafa-1.3.0/src/gafa/__init__.py +0 -0
  21. gafa-1.3.0/src/gafa/antenna_patterns.py +512 -0
  22. gafa-1.3.0/src/gafa/cli.py +173 -0
  23. gafa-1.3.0/src/gafa/config/s1/s1_ew_ipf.toml +59 -0
  24. gafa-1.3.0/src/gafa/config/s1/s1_iw_ipf.toml +46 -0
  25. gafa-1.3.0/src/gafa/config/s1/s1_s1_ipf.toml +19 -0
  26. gafa-1.3.0/src/gafa/config/s1/s1_s2_ipf.toml +19 -0
  27. gafa-1.3.0/src/gafa/config/s1/s1_s3_ipf.toml +19 -0
  28. gafa-1.3.0/src/gafa/config/s1/s1_s4_ipf.toml +19 -0
  29. gafa-1.3.0/src/gafa/config/s1/s1_s5_ipf.toml +19 -0
  30. gafa-1.3.0/src/gafa/config/s1/s1_s6_ipf.toml +19 -0
  31. gafa-1.3.0/src/gafa/config/s1/s1_wv_ipf.toml +34 -0
  32. gafa-1.3.0/src/gafa/defaults.py +61 -0
  33. gafa-1.3.0/src/gafa/forward/azimuth_processing.py +2035 -0
  34. gafa-1.3.0/src/gafa/forward/doppler_methods.py +660 -0
  35. gafa-1.3.0/src/gafa/forward/range_processing.py +559 -0
  36. gafa-1.3.0/src/gafa/forward/tdbp/tdbp_gafa.py +730 -0
  37. gafa-1.3.0/src/gafa/interpolators.py +70 -0
  38. gafa-1.3.0/src/gafa/io/__init__.py +8 -0
  39. gafa-1.3.0/src/gafa/io/gafa/__init__.py +10 -0
  40. gafa-1.3.0/src/gafa/io/gafa/reader.py +116 -0
  41. gafa-1.3.0/src/gafa/io/gafa/writer.py +450 -0
  42. gafa-1.3.0/src/gafa/io/gafa/xdt_tools.py +401 -0
  43. gafa-1.3.0/src/gafa/io/geosar/__init__.py +21 -0
  44. gafa-1.3.0/src/gafa/io/geosar/_common.py +262 -0
  45. gafa-1.3.0/src/gafa/io/geosar/aresys_raw_reader.py +132 -0
  46. gafa-1.3.0/src/gafa/io/geosar/aresys_slc_reader.py +46 -0
  47. gafa-1.3.0/src/gafa/io/geosar/grid.py +77 -0
  48. gafa-1.3.0/src/gafa/io/sentinel1/auxiliary.py +786 -0
  49. gafa-1.3.0/src/gafa/io/sentinel1/baq.py +164 -0
  50. gafa-1.3.0/src/gafa/io/sentinel1/calib.py +676 -0
  51. gafa-1.3.0/src/gafa/io/sentinel1/fdbaq.py +342 -0
  52. gafa-1.3.0/src/gafa/io/sentinel1/orbit.py +108 -0
  53. gafa-1.3.0/src/gafa/io/sentinel1/reader.py +663 -0
  54. gafa-1.3.0/src/gafa/io/sentinel1/sspheaders.py +829 -0
  55. gafa-1.3.0/src/gafa/io/sentinel1/timeline.py +2114 -0
  56. gafa-1.3.0/src/gafa/io/sentinel1/util.py +156 -0
  57. gafa-1.3.0/src/gafa/kernels.py +800 -0
  58. gafa-1.3.0/src/gafa/mbczt.py +838 -0
  59. gafa-1.3.0/src/gafa/metatools.py +30 -0
  60. gafa-1.3.0/src/gafa/processor.py +505 -0
  61. gafa-1.3.0/src/gafa/rastertools.py +122 -0
  62. gafa-1.3.0/src/gafa/util.py +337 -0
  63. gafa-1.3.0/src/gafa/window_functions.py +74 -0
  64. gafa-1.3.0/tests/reference_models/__init__.py +1 -0
  65. gafa-1.3.0/tests/reference_models/antenna.py +245 -0
  66. gafa-1.3.0/tests/reference_models/doppler.py +143 -0
  67. gafa-1.3.0/tests/test_antenna_doppler_reference.py +111 -0
  68. gafa-1.3.0/tests/test_antenna_patterns.py +219 -0
  69. gafa-1.3.0/tests/test_azimuth_kernel_degree.py +55 -0
  70. gafa-1.3.0/tests/test_azimuth_lazy_focusing.py +250 -0
  71. gafa-1.3.0/tests/test_azimuth_spectral_extension.py +460 -0
  72. gafa-1.3.0/tests/test_bulk_focusing_frequency_order.py +40 -0
  73. gafa-1.3.0/tests/test_doppler_benchmarks.py +57 -0
  74. gafa-1.3.0/tests/test_doppler_geometry.py +325 -0
  75. gafa-1.3.0/tests/test_gafa_netcdf.py +97 -0
  76. gafa-1.3.0/tests/test_geosar_reader.py +121 -0
  77. gafa-1.3.0/tests/test_kernel_range_rate.py +74 -0
  78. gafa-1.3.0/tests/test_processing_metadata.py +175 -0
  79. gafa-1.3.0/tests/test_range_czt.py +25 -0
  80. gafa-1.3.0/tests/test_range_processing.py +208 -0
  81. gafa-1.3.0/tests/test_tdbp_bandwidth.py +65 -0
  82. gafa-1.3.0/tests/test_tdbp_gafa.py +289 -0
gafa-1.3.0/.gitignore ADDED
@@ -0,0 +1,49 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .python-version
9
+ /gafa_config.toml
10
+
11
+ # editor tmp/backup files
12
+ *~
13
+ .*.sw?
14
+
15
+ # direnv
16
+ .envrc
17
+
18
+ # Virtual environments
19
+ .venv
20
+
21
+ # VS code config
22
+ .vscode
23
+
24
+ # UV lockfile
25
+ uv.lock
26
+
27
+ # Local validation products and working notebooks
28
+ /output/
29
+ /notebooks/
30
+ /validation/results/
31
+ /tmp/
32
+ /.coverage
33
+ .DS_Store
34
+ geosar_validation/
35
+
36
+ # Local review material
37
+ /validation/
38
+ /examples/test_results*/
39
+
40
+ # Focused outputs, e.g. from testing
41
+ GAFA_*_*/
42
+
43
+ .ipynb_checkpoints/
44
+ .pytest_cache/
45
+ .ruff_cache/
46
+ *.log
47
+ /gafa4heeps.tar.gz
48
+ /examples/*_draft.ipynb
49
+ /examples/bistatic_ptr_scalian.ipynb
@@ -0,0 +1,97 @@
1
+ variables:
2
+ PYTHON_VERSION: 3.12
3
+ BASE_LAYER: bookworm-slim
4
+ UV_VERSION: 0.9.7
5
+ RUFF_VERSION: 0.14.3
6
+ # Tag patterns, in PEP 440 form. See
7
+ # https://peps.python.org/pep-0440/ for the full grammar.
8
+ # - Prereleases: vX.Y.ZrcN (release candidates)
9
+ # - Stable: vX.Y.Z
10
+ # - Patch: vX.Y.Z.postN (post-releases, used for
11
+ # cherry-picked fixes on top
12
+ # of a stable release, cut
13
+ # from a dedicated release
14
+ # branch such as release/v1.2)
15
+ PRERELEASE_TAG_REGEX: '/^v\d+\.\d+\.\d+rc\d+$/'
16
+ STABLE_TAG_REGEX: '/^v\d+\.\d+\.\d+$/'
17
+ PATCH_TAG_REGEX: '/^v\d+\.\d+\.\d+\.post\d+$/'
18
+
19
+ stages:
20
+ - format
21
+ - test
22
+ - build
23
+ - release
24
+
25
+ .base:
26
+ tags: [docker]
27
+ image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
28
+
29
+ ruff-format:
30
+ # Check formatting with ruff. Dropping the rules: block below makes it run
31
+ # on every branch and tag pipeline, so a tagged pipeline cannot reach
32
+ # build-package unless it passes.
33
+ stage: format
34
+ extends: .base
35
+ before_script:
36
+ - cd $CI_PROJECT_DIR
37
+ - uvx ruff@${RUFF_VERSION} --version
38
+ script:
39
+ - uvx ruff@${RUFF_VERSION} format --diff # Check formatting
40
+ - uvx ruff@${RUFF_VERSION} check --select I # Check that imports are sorted
41
+
42
+ run-tests:
43
+ # Run the test suite. Dropping the rules: block below makes it run on every
44
+ # branch and tag pipeline, so a tagged pipeline cannot reach build-package
45
+ # unless it passes.
46
+ stage: test
47
+ extends: .base
48
+ rules:
49
+ # Manual until test_doppler_geometry's range-rate failure is settled.
50
+ - when: manual
51
+ allow_failure: true
52
+ variables:
53
+ # hatch-vcs derives the version with `git describe`, which needs the tags
54
+ # and history that CI's default shallow clone omits.
55
+ GIT_DEPTH: 0
56
+ before_script:
57
+ - apt-get update && apt-get install -y git
58
+ script:
59
+ # --prerelease allow: remove when the gdar-* floors are raised to 1.3.0
60
+ - uv sync --group dev --prerelease allow
61
+ - uv run pytest tests/ -q
62
+
63
+ build-package:
64
+ # Build package using uv.
65
+ extends: .base
66
+ stage: build
67
+ rules:
68
+ # Run build on prerelease, stable, and patch (post-release) tags.
69
+ - if: '$CI_COMMIT_TAG =~ $PRERELEASE_TAG_REGEX'
70
+ - if: '$CI_COMMIT_TAG =~ $STABLE_TAG_REGEX'
71
+ - if: '$CI_COMMIT_TAG =~ $PATCH_TAG_REGEX'
72
+ variables:
73
+ PACKAGE_REGISTRY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
74
+ before_script:
75
+ - apt-get update && apt-get install -y git
76
+ script:
77
+ # Build and publish
78
+ - uv build
79
+ - uv publish --publish-url ${PACKAGE_REGISTRY_URL} --username gitlab-ci-token --password ${CI_JOB_TOKEN}
80
+
81
+ create-release:
82
+ # Create a release in GitLab.
83
+ extends: .base
84
+ stage: release
85
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
86
+ rules:
87
+ # Run release creation on stable and patch tags. Prereleases are
88
+ # published to the package registry but do not get a GitLab release
89
+ # page.
90
+ - if: '$CI_COMMIT_TAG =~ $STABLE_TAG_REGEX'
91
+ - if: '$CI_COMMIT_TAG =~ $PATCH_TAG_REGEX'
92
+ script:
93
+ - echo "Creating release for tag $CI_COMMIT_TAG"
94
+ release:
95
+ tag_name: "$CI_COMMIT_TAG"
96
+ description: "$CI_COMMIT_TAG"
97
+ ref: "$CI_COMMIT_SHA"
@@ -0,0 +1,97 @@
1
+ # Changelog
2
+
3
+ ## v1.3.0
4
+
5
+ The first public release of gafa. It needs Python 3.11 or later, and
6
+ gdar-base, gdar-orbit and gdar-sar 1.3.0 or later, which install from PyPI
7
+ automatically.
8
+
9
+ ### Licensing
10
+
11
+ - **Dual licensed under Apache-2.0 and ESA-PL Permissive v2.5**, at the user's
12
+ option. Both licence texts are distributed with the package as
13
+ `LICENSE-Apache-2.0.txt` and `LICENSE-ESA-PL-Permissive-2.5.txt`.
14
+
15
+ ### For pre-release users
16
+
17
+ gafa has not been published before, so nothing here breaks a released
18
+ version. One move is worth flagging for anyone who has been using gafa
19
+ internally: the orbit propagator is now `gdar.orbit.propagator`, so import
20
+ `Propagator` from there rather than from `gafa.propagator`.
21
+
22
+ ### New features
23
+
24
+ - **GeoSAR RAW and SLC readers.**
25
+
26
+ - **Time-domain back-projection with full-aperture block focusing.**
27
+
28
+ - **Bistatic elevation pattern correction** in the calibration path.
29
+
30
+ - **SLC metadata helpers** in `metatools`, and a `slc` level added when
31
+ annotating processing parameters.
32
+
33
+ - **A command-line entry point**, `cli/gafa_tool`.
34
+
35
+ - **Demonstration notebooks** for the bistatic point-target response, GeoSAR,
36
+ and region-of-interest processing, alongside a `getting-started.md` and
37
+ bistatic Doppler documentation.
38
+
39
+ ### Bug fixes
40
+
41
+ - **Auxiliary and product files under a symlinked directory were never
42
+ found.** `find_paths` searched with `Path.glob("**/*")`, which does not
43
+ descend into symlinked directories on any Python version, so an aux root or
44
+ a `.SAFE` assembled from symlinks appeared empty and the run fell back as
45
+ though the files were absent. The search now uses
46
+ `os.walk(..., followlinks=True)`. Affects the AUX_INS/AUX_CAL and orbit
47
+ lookup, the measurement files inside a product, and the annotation XML
48
+ inside a located AUX directory.
49
+
50
+ - **Range compression used the wrong chirp bandwidth** — it now uses the
51
+ transmitted bandwidth.
52
+
53
+ - **TOPS focusing did not preserve phase or align the focused output.** Both
54
+ are corrected, along with the bistatic TOPS path.
55
+
56
+ - **Bistatic kernel evaluation was unstable at high squint.**
57
+
58
+ - **Doppler geometry ignored the annotated grid time and the sampled
59
+ pointing.**
60
+
61
+ - **The reference range rate was a scalar** where it varies across the grid,
62
+ and is now an array.
63
+
64
+ - **Nested complex metadata was not preserved** by the I/O layer.
65
+
66
+ - Fixed code after numpy's deprecation of assignment to `array.shape`.
67
+
68
+ ### Tests
69
+
70
+ - Reference models for antenna patterns and Doppler, against which the
71
+ processing chain is checked.
72
+
73
+ - New coverage for azimuth spectral extension, azimuth kernel degree, lazy and
74
+ bulk focusing, range processing and the range CZT, TDBP, the GeoSAR reader,
75
+ NetCDF output, and processing metadata.
76
+
77
+ ### Packaging
78
+
79
+ - **The Sentinel-1 processing configurations ship with the package**, as
80
+ `gafa/config/s1/*.toml` — one per mode, covering IW, EW, WV and the six
81
+ stripmap beams. They are in the wheel, so they are available from an
82
+ installed copy and not only from a checkout.
83
+
84
+ - **Configuration files are read through `gdar.base.config`**, so gafa and the
85
+ gdar packages share one configuration file and format.
86
+
87
+ - **`CHANGELOG.md` ships inside the wheel** as `gafa/CHANGELOG.md`, which the
88
+ ESA-PL licence requires, as well as in the source distribution.
89
+
90
+ - **The example notebooks are in the source distribution**, under `examples/`,
91
+ alongside a `gafa_config.toml.example` and a worked IPF script. They are not
92
+ in the wheel.
93
+
94
+ - **A `dev` dependency group** provides `pytest` and `pytest-subtests`.
95
+
96
+ - **The `crs` extra is empty.** It exists only for symmetry with the gdar
97
+ packages, and does nothing.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.