sct-point-target-analysis 1.0.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 (29) hide show
  1. sct_point_target_analysis-1.0.0/.gitignore +198 -0
  2. sct_point_target_analysis-1.0.0/LICENSE.txt +21 -0
  3. sct_point_target_analysis-1.0.0/PKG-INFO +106 -0
  4. sct_point_target_analysis-1.0.0/README.md +37 -0
  5. sct_point_target_analysis-1.0.0/pyproject.toml +115 -0
  6. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/__init__.py +9 -0
  7. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/cli.py +91 -0
  8. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/config.py +216 -0
  9. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/__init__.py +8 -0
  10. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/analysis.py +139 -0
  11. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/atmospheric_corrections_core.py +112 -0
  12. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/atmospheric_corrections_main.py +108 -0
  13. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/geodynamics_corrections_core.py +103 -0
  14. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/geodynamics_corrections_main.py +69 -0
  15. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/core/utilities.py +337 -0
  16. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/interface.py +52 -0
  17. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/main.py +79 -0
  18. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/resources/__init__.py +8 -0
  19. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/resources/config_schema.json +263 -0
  20. sct_point_target_analysis-1.0.0/src/sct_point_target_analysis/testing.py +228 -0
  21. sct_point_target_analysis-1.0.0/tests/__init__.py +4 -0
  22. sct_point_target_analysis-1.0.0/tests/unittest/__init__.py +4 -0
  23. sct_point_target_analysis-1.0.0/tests/unittest/test_atmospheric_corrections_main.py +76 -0
  24. sct_point_target_analysis-1.0.0/tests/unittest/test_geodynamics_corrections_main.py +40 -0
  25. sct_point_target_analysis-1.0.0/tests/unittest/test_plugin_interface.py +75 -0
  26. sct_point_target_analysis-1.0.0/tests/unittest/test_point_target_analysis.py +57 -0
  27. sct_point_target_analysis-1.0.0/tests/unittest/test_point_target_utilities.py +157 -0
  28. sct_point_target_analysis-1.0.0/tests/unittest/test_pta_cli.py +59 -0
  29. sct_point_target_analysis-1.0.0/tests/unittest/test_pta_config.py +324 -0
@@ -0,0 +1,198 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm-project.org/#use-with-ide
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # Distribution / packaging
165
+ build/
166
+ _build/
167
+ dist/
168
+ *.egg-info/
169
+ .ipynb_checkpoints/
170
+ .nox
171
+
172
+ # Pyenv
173
+ .python-version
174
+
175
+ # VS Code project settings
176
+ .vscode
177
+
178
+ # PyCharm project settings
179
+ .idea
180
+
181
+ # Spyder project settings
182
+ .spyproject
183
+
184
+ # Environments
185
+ venv*
186
+
187
+ # Docker
188
+ docker-compose.yml
189
+ Dockerfile
190
+ .devcontainer
191
+
192
+ # Other
193
+ *.bak
194
+ .coverage
195
+ htmlcov
196
+ *.svg
197
+
198
+ pdm.lock
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) Aresys S.r.l. <info@aresys.it>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.5
2
+ Name: sct_point_target_analysis
3
+ Version: 1.0.0
4
+ Summary: SCT Plugin for Point Target Analysis of L1 SAR Products.
5
+ Project-URL: Homepage, https://github.com/aresys-srl/sct_plugins_analyses
6
+ Project-URL: Repository, https://github.com/aresys-srl/sct_plugins_analyses
7
+ Project-URL: Documentation, https://opensource.aresys.it/sct_plugins_analyses
8
+ Author-email: "Aresys S.R.L." <info@aresys.it>
9
+ License: MIT License
10
+
11
+ Copyright (C) Aresys S.r.l. <info@aresys.it>
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE.txt
31
+ Classifier: Development Status :: 5 - Production/Stable
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: Intended Audience :: Education
34
+ Classifier: Intended Audience :: Science/Research
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Natural Language :: English
37
+ Classifier: Operating System :: OS Independent
38
+ Classifier: Programming Language :: Python
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Programming Language :: Python :: 3.13
42
+ Classifier: Programming Language :: Python :: 3.14
43
+ Classifier: Topic :: Scientific/Engineering
44
+ Classifier: Topic :: Software Development :: Libraries
45
+ Classifier: Topic :: Utilities
46
+ Classifier: Typing :: Typed
47
+ Requires-Python: >=3.11
48
+ Requires-Dist: jsonschema
49
+ Requires-Dist: numpy>2
50
+ Requires-Dist: pandas>=1.4.0
51
+ Requires-Dist: perseo-core>=1.0.0
52
+ Requires-Dist: perseo-perturbations>=1.0.0
53
+ Requires-Dist: perseo-quality>=1.1.0
54
+ Requires-Dist: scipy>1.13
55
+ Requires-Dist: sct>=3.2.1
56
+ Requires-Dist: typer>=0.27.2
57
+ Provides-Extra: dev
58
+ Requires-Dist: pylint; extra == 'dev'
59
+ Requires-Dist: ruff; extra == 'dev'
60
+ Provides-Extra: docs
61
+ Requires-Dist: mkdocstrings-python; extra == 'docs'
62
+ Requires-Dist: zensical; extra == 'docs'
63
+ Provides-Extra: test
64
+ Requires-Dist: pytest; extra == 'test'
65
+ Requires-Dist: pytest-cov; extra == 'test'
66
+ Requires-Dist: pytest-mock; extra == 'test'
67
+ Requires-Dist: sct[graphs]>=3.2.1; extra == 'test'
68
+ Description-Content-Type: text/markdown
69
+
70
+ # SCT Plugin: Point Target Analysis
71
+
72
+ [![PyPI version](https://img.shields.io/pypi/v/sct-point-target-analysis)](https://pypi.org/project/sct-point-target-analysis/)
73
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://python.org)
74
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.txt)
75
+
76
+ [![CI](https://github.com/aresys-srl/sct_plugins_analyses/actions/workflows/point_target.yml/badge.svg)](https://github.com/aresys-srl/sct_plugins_analyses/actions/workflows/point_target.yml)
77
+
78
+ [SCT (SAR Calibration Toolbox)](https://github.com/aresys-srl/sct) plugin for performing
79
+ Point Target Analysis on L1 SAR products. Enables point target characterization,
80
+ impulse response measurement, localization errors estimation and radiometric quality assessment through SCT.
81
+
82
+ ## Installation
83
+
84
+ ``` bash
85
+ pip install sct-point-target-analysis
86
+ ```
87
+
88
+ SCT is automatically installed as a dependency.
89
+
90
+ ## Compatibility
91
+
92
+ This plugin must be installed in the same Python environment as SCT. Once installed,
93
+ the plugin is automatically discovered and registered by SCT through its entry-point
94
+ based plugin system; no additional configuration is required.
95
+
96
+ ## Documentation
97
+
98
+ - [SCT documentation](https://opensource.aresys.it/sct/)
99
+ - [Quality Analysis documentation](https://opensource.aresys.it/perseo/documentation/quality/)
100
+ - [Analysis Plugins documentation](https://opensource.aresys.it/sct_plugins_analyses)
101
+
102
+ ## License
103
+
104
+ This project is licensed under the MIT License. See the [LICENSE.txt](LICENSE.txt) file for details.
105
+
106
+ Copyright &copy; 2026-present Aresys S.r.l. <info@aresys.it>
@@ -0,0 +1,37 @@
1
+ # SCT Plugin: Point Target Analysis
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/sct-point-target-analysis)](https://pypi.org/project/sct-point-target-analysis/)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://python.org)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.txt)
6
+
7
+ [![CI](https://github.com/aresys-srl/sct_plugins_analyses/actions/workflows/point_target.yml/badge.svg)](https://github.com/aresys-srl/sct_plugins_analyses/actions/workflows/point_target.yml)
8
+
9
+ [SCT (SAR Calibration Toolbox)](https://github.com/aresys-srl/sct) plugin for performing
10
+ Point Target Analysis on L1 SAR products. Enables point target characterization,
11
+ impulse response measurement, localization errors estimation and radiometric quality assessment through SCT.
12
+
13
+ ## Installation
14
+
15
+ ``` bash
16
+ pip install sct-point-target-analysis
17
+ ```
18
+
19
+ SCT is automatically installed as a dependency.
20
+
21
+ ## Compatibility
22
+
23
+ This plugin must be installed in the same Python environment as SCT. Once installed,
24
+ the plugin is automatically discovered and registered by SCT through its entry-point
25
+ based plugin system; no additional configuration is required.
26
+
27
+ ## Documentation
28
+
29
+ - [SCT documentation](https://opensource.aresys.it/sct/)
30
+ - [Quality Analysis documentation](https://opensource.aresys.it/perseo/documentation/quality/)
31
+ - [Analysis Plugins documentation](https://opensource.aresys.it/sct_plugins_analyses)
32
+
33
+ ## License
34
+
35
+ This project is licensed under the MIT License. See the [LICENSE.txt](LICENSE.txt) file for details.
36
+
37
+ Copyright &copy; 2026-present Aresys S.r.l. <info@aresys.it>
@@ -0,0 +1,115 @@
1
+ [project]
2
+ name = "sct_point_target_analysis"
3
+ description = "SCT Plugin for Point Target Analysis of L1 SAR Products."
4
+ authors = [{ name = "Aresys S.R.L.", email = "info@aresys.it" }]
5
+ requires-python = ">=3.11"
6
+ readme = "README.md"
7
+ license = { file = "LICENSE.txt" }
8
+ dependencies = [
9
+ "numpy>2",
10
+ "scipy>1.13",
11
+ "pandas>=1.4.0",
12
+ "jsonschema",
13
+ "typer>=0.27.2",
14
+ "perseo-core>=1.0.0",
15
+ "perseo-perturbations>=1.0.0",
16
+ "perseo-quality>=1.1.0",
17
+ "sct>=3.2.1",
18
+ ]
19
+ dynamic = ["version"]
20
+ classifiers = [
21
+ "Development Status :: 5 - Production/Stable",
22
+ "Intended Audience :: Science/Research",
23
+ "Intended Audience :: Education",
24
+ "Intended Audience :: Developers",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Natural Language :: English",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: 3.14",
32
+ "Operating System :: OS Independent",
33
+ "Topic :: Software Development :: Libraries",
34
+ "Topic :: Utilities",
35
+ "Topic :: Scientific/Engineering",
36
+ "Typing :: Typed",
37
+ ]
38
+
39
+ [project.urls]
40
+ Homepage = "https://github.com/aresys-srl/sct_plugins_analyses"
41
+ Repository = "https://github.com/aresys-srl/sct_plugins_analyses"
42
+ Documentation = "https://opensource.aresys.it/sct_plugins_analyses"
43
+
44
+ [project.optional-dependencies]
45
+ dev = ["ruff", "pylint"]
46
+ test = ["pytest", "pytest-cov", "pytest-mock", "sct[graphs]>=3.2.1"]
47
+ docs = ["zensical", "mkdocstrings-python"]
48
+
49
+ [project.entry-points."sct.analyses"]
50
+ point_target = "sct_point_target_analysis.interface:PointTargetAnalysisPlugin"
51
+
52
+ [build-system]
53
+ requires = ["hatchling"]
54
+ build-backend = "hatchling.build"
55
+
56
+ [tool.hatch.version]
57
+ path = "src/sct_point_target_analysis/__init__.py"
58
+
59
+ [tool.hatch.build.targets.sdist]
60
+ only-include = ["src", "tests"]
61
+
62
+ [tool.hatch.metadata]
63
+ allow-direct-references = true
64
+
65
+ [tool.pytest.ini_options]
66
+ minversion = "8.0"
67
+ testpaths = ["tests"]
68
+ python_files = ["test_*.py"]
69
+ python_classes = ["Test*"]
70
+ python_functions = ["test_*"]
71
+ addopts = [
72
+ "-ra",
73
+ "--strict-markers",
74
+ "--strict-config",
75
+ "--tb=short",
76
+ "--cov=sct_point_target_analysis",
77
+ "--cov-report=term-missing",
78
+ "--cov-report=html",
79
+ "--no-cov-on-fail",
80
+ ]
81
+
82
+ [tool.coverage.run]
83
+ branch = true
84
+ source = ["src"]
85
+
86
+ [tool.coverage.report]
87
+ skip_covered = true
88
+ show_missing = true
89
+ fail_under = 70
90
+
91
+ [tool.pylint.master]
92
+ fail-under = 8.5
93
+ fail-on = ["unused-import"]
94
+
95
+ [tool.pylint.message_control]
96
+ disable = ["import-error", "logging-fstring-interpolation", "logging-not-lazy"]
97
+
98
+ [tool.pylint.format]
99
+ max-line-length = 120
100
+
101
+ [tool.pdm]
102
+ distribution = true
103
+
104
+ [tool.pdm.resolution]
105
+ respect-source-order = true
106
+
107
+ [tool.pdm.scripts]
108
+ format_check = "ruff format --check"
109
+ format = "ruff format"
110
+ sort = "ruff check --select I --fix-only"
111
+ lint_check = "ruff check"
112
+ lint_fix = "ruff check --show-fixes --fix-only"
113
+ test = "python -m pytest ./tests -v"
114
+ check_code = { composite = ["format_check", "lint_check"] }
115
+ fix_format = { composite = ["format", "sort", "lint_fix"] }
@@ -0,0 +1,9 @@
1
+ # SPDX-FileCopyrightText: Aresys S.r.l. <info@aresys.it>
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ """Point Target Analysis on L1 SAR Products plugin for SCT.
5
+
6
+ Discovered by SCT via the ``sct.analyses`` entry-point namespace.
7
+ """
8
+
9
+ __version__ = "1.0.0"
@@ -0,0 +1,91 @@
1
+ # SPDX-FileCopyrightText: Aresys S.r.l. <info@aresys.it>
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ """Command Line Interface for Point Target Analysis."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from pathlib import Path
9
+
10
+ import typer
11
+ from sct.cli import common
12
+ from sct.configuration.config import GeneralConfiguration
13
+ from sct.configuration.logger import sct_logger
14
+
15
+ from sct_point_target_analysis.config import SCTPointTargetAnalysisConfig
16
+
17
+
18
+ def target_analysis(
19
+ ctx: typer.Context,
20
+ product: common.InputProductOption,
21
+ point_target_source: common.InputPointTargetSource,
22
+ output_directory: common.OutputDirectoryOption,
23
+ external_orbit: common.ExternalOrbitInputOption = None,
24
+ external_corrections_product: common.ExternalCorrectionInputProductOption = None,
25
+ graphs: common.GraphsOption = False,
26
+ ) -> None:
27
+ """Point Target Analysis (IRF, Localization and RCS)."""
28
+
29
+ config: GeneralConfiguration = ctx.obj
30
+
31
+ log_path = output_directory / "sct_pta_analysis.log" if config.save_log else None
32
+
33
+ with common.logging_to_file(log_path):
34
+ sct_logger.info(f"Product: {product}")
35
+
36
+ if external_orbit:
37
+ sct_logger.info(f"External orbit: {external_orbit}")
38
+ else:
39
+ sct_logger.info("No external orbit provided, using orbit from product.")
40
+
41
+ if external_corrections_product:
42
+ sct_logger.info(f"External ALE Corrections Product: {external_corrections_product}")
43
+
44
+ sct_logger.info(f"Point targets: {point_target_source}")
45
+ sct_logger.info(f"Output folder: {output_directory}")
46
+ sct_logger.info(f"Graphs generation {'enabled' if graphs else 'disabled'}")
47
+
48
+ common.display_title("Point Target Analysis")
49
+
50
+ analysis_config = (
51
+ SCTPointTargetAnalysisConfig.from_toml(config.toml_path)
52
+ if config.toml_path is not None
53
+ else SCTPointTargetAnalysisConfig()
54
+ )
55
+
56
+ target_analysis_implementation(
57
+ product=product,
58
+ external_orbit=external_orbit,
59
+ external_corrections_product=external_corrections_product,
60
+ point_target_source=point_target_source,
61
+ output_directory=output_directory,
62
+ config=analysis_config,
63
+ graphs=graphs,
64
+ dump_config=config.save_config_copy,
65
+ )
66
+
67
+
68
+ @common.log_elapsed_time("Point Target Analysis")
69
+ @common.graceful_exit("Point Target Analysis")
70
+ def target_analysis_implementation(
71
+ product: Path,
72
+ external_orbit: Path | None,
73
+ external_corrections_product: Path | None,
74
+ point_target_source: Path,
75
+ output_directory: Path,
76
+ config: SCTPointTargetAnalysisConfig,
77
+ graphs: bool,
78
+ dump_config: bool,
79
+ ) -> None:
80
+ """Implement the point target analysis command."""
81
+ from sct_point_target_analysis.main import full_point_target_analysis
82
+
83
+ full_point_target_analysis(
84
+ product=product,
85
+ external_orbit=external_orbit,
86
+ external_corrections_product=external_corrections_product,
87
+ point_target_source=point_target_source,
88
+ output_directory=output_directory,
89
+ config=config,
90
+ graphs=graphs,
91
+ )