hebog 0.22.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.
- hebog-0.22.0/LICENSE +28 -0
- hebog-0.22.0/PKG-INFO +149 -0
- hebog-0.22.0/README.md +124 -0
- hebog-0.22.0/pyproject.toml +143 -0
- hebog-0.22.0/pyproject.toml.orig +143 -0
- hebog-0.22.0/src/hebog/__init__.py +43 -0
- hebog-0.22.0/src/hebog/__main__.py +5 -0
- hebog-0.22.0/src/hebog/adapters/__init__.py +17 -0
- hebog-0.22.0/src/hebog/adapters/rapthor.py +445 -0
- hebog-0.22.0/src/hebog/adapters/rapthor_catalogue.py +265 -0
- hebog-0.22.0/src/hebog/adapters/rapthor_comparison.py +331 -0
- hebog-0.22.0/src/hebog/algorithms/__init__.py +1 -0
- hebog-0.22.0/src/hebog/algorithms/astrometry.py +930 -0
- hebog-0.22.0/src/hebog/algorithms/background.py +1341 -0
- hebog-0.22.0/src/hebog/algorithms/component_measurement.py +1771 -0
- hebog-0.22.0/src/hebog/algorithms/component_records.py +240 -0
- hebog-0.22.0/src/hebog/algorithms/component_topology.py +433 -0
- hebog-0.22.0/src/hebog/algorithms/deblending.py +544 -0
- hebog-0.22.0/src/hebog/algorithms/detection.py +146 -0
- hebog-0.22.0/src/hebog/algorithms/extended_measurement.py +1508 -0
- hebog-0.22.0/src/hebog/algorithms/feature_envelopes.py +550 -0
- hebog-0.22.0/src/hebog/algorithms/fft.py +50 -0
- hebog-0.22.0/src/hebog/algorithms/fitting.py +1952 -0
- hebog-0.22.0/src/hebog/algorithms/label_groups.py +211 -0
- hebog-0.22.0/src/hebog/algorithms/labelling.py +303 -0
- hebog-0.22.0/src/hebog/algorithms/measurement.py +358 -0
- hebog-0.22.0/src/hebog/algorithms/multiscale.py +1263 -0
- hebog-0.22.0/src/hebog/algorithms/multiscale_association.py +729 -0
- hebog-0.22.0/src/hebog/algorithms/multiscale_tiles.py +444 -0
- hebog-0.22.0/src/hebog/algorithms/owner_connectivity.py +642 -0
- hebog-0.22.0/src/hebog/algorithms/partitioning.py +21 -0
- hebog-0.22.0/src/hebog/algorithms/reconciliation.py +527 -0
- hebog-0.22.0/src/hebog/algorithms/source_association.py +1398 -0
- hebog-0.22.0/src/hebog/algorithms/source_count.py +109 -0
- hebog-0.22.0/src/hebog/cli.py +30 -0
- hebog-0.22.0/src/hebog/config.py +551 -0
- hebog-0.22.0/src/hebog/data_models/__init__.py +83 -0
- hebog-0.22.0/src/hebog/data_models/astrometry.py +91 -0
- hebog-0.22.0/src/hebog/data_models/catalogues.py +456 -0
- hebog-0.22.0/src/hebog/data_models/fitting.py +156 -0
- hebog-0.22.0/src/hebog/data_models/generations.py +145 -0
- hebog-0.22.0/src/hebog/data_models/images.py +132 -0
- hebog-0.22.0/src/hebog/data_models/measurement.py +132 -0
- hebog-0.22.0/src/hebog/data_models/measurement_diagnostics.py +147 -0
- hebog-0.22.0/src/hebog/data_models/multiscale.py +120 -0
- hebog-0.22.0/src/hebog/data_models/partitioning.py +406 -0
- hebog-0.22.0/src/hebog/data_models/products.py +55 -0
- hebog-0.22.0/src/hebog/data_models/source_association.py +453 -0
- hebog-0.22.0/src/hebog/data_models/source_finding.py +634 -0
- hebog-0.22.0/src/hebog/executors/__init__.py +38 -0
- hebog-0.22.0/src/hebog/executors/base.py +191 -0
- hebog-0.22.0/src/hebog/executors/dask.py +247 -0
- hebog-0.22.0/src/hebog/executors/serial.py +71 -0
- hebog-0.22.0/src/hebog/executors/threads.py +166 -0
- hebog-0.22.0/src/hebog/io/__init__.py +63 -0
- hebog-0.22.0/src/hebog/io/base.py +80 -0
- hebog-0.22.0/src/hebog/io/filesystem.py +44 -0
- hebog-0.22.0/src/hebog/io/fits.py +765 -0
- hebog-0.22.0/src/hebog/io/materialization.py +1307 -0
- hebog-0.22.0/src/hebog/io/pixel_validity.py +187 -0
- hebog-0.22.0/src/hebog/io/staging.py +240 -0
- hebog-0.22.0/src/hebog/io/zarr.py +854 -0
- hebog-0.22.0/src/hebog/pipeline.py +191 -0
- hebog-0.22.0/src/hebog/public_api.py +1554 -0
- hebog-0.22.0/src/hebog/public_science.py +83 -0
- hebog-0.22.0/src/hebog/py.typed +0 -0
- hebog-0.22.0/src/hebog/resources/__init__.py +1 -0
- hebog-0.22.0/src/hebog/resources/reviewed_continuum_profile.json +198 -0
- hebog-0.22.0/src/hebog/science/__init__.py +1 -0
- hebog-0.22.0/src/hebog/science/catalogue_rows.py +253 -0
- hebog-0.22.0/src/hebog/science/catalogues.py +636 -0
- hebog-0.22.0/src/hebog/science/configuration.py +74 -0
- hebog-0.22.0/src/hebog/science/continuum.py +81 -0
- hebog-0.22.0/src/hebog/science/detection_islands.py +254 -0
- hebog-0.22.0/src/hebog/science/models.py +130 -0
- hebog-0.22.0/src/hebog/science/profile.py +101 -0
- hebog-0.22.0/src/hebog/science/segment_rows.py +950 -0
- hebog-0.22.0/src/hebog/stages/__init__.py +1 -0
- hebog-0.22.0/src/hebog/stages/association.py +1487 -0
- hebog-0.22.0/src/hebog/stages/background.py +1686 -0
- hebog-0.22.0/src/hebog/stages/batching.py +208 -0
- hebog-0.22.0/src/hebog/stages/catalogue_rows.py +1189 -0
- hebog-0.22.0/src/hebog/stages/component_fits.py +1049 -0
- hebog-0.22.0/src/hebog/stages/component_topology.py +844 -0
- hebog-0.22.0/src/hebog/stages/composition.py +1344 -0
- hebog-0.22.0/src/hebog/stages/detection.py +539 -0
- hebog-0.22.0/src/hebog/stages/extended_groups.py +639 -0
- hebog-0.22.0/src/hebog/stages/fit_parents.py +812 -0
- hebog-0.22.0/src/hebog/stages/islands.py +888 -0
- hebog-0.22.0/src/hebog/stages/multiscale.py +1081 -0
- hebog-0.22.0/src/hebog/stages/object_extents.py +219 -0
- hebog-0.22.0/src/hebog/stages/publication.py +1421 -0
- hebog-0.22.0/src/hebog/stages/sources.py +1264 -0
- hebog-0.22.0/src/hebog/stages/support.py +621 -0
- hebog-0.22.0/src/hebog/stages/task_memory.py +77 -0
- hebog-0.22.0/src/hebog/validation/__init__.py +1 -0
- hebog-0.22.0/src/hebog/validation/baselines.py +506 -0
- hebog-0.22.0/src/hebog/validation/campaign_runtime.py +35 -0
- hebog-0.22.0/src/hebog/validation/campaigns.py +129 -0
- hebog-0.22.0/src/hebog/validation/comparison.py +2067 -0
- hebog-0.22.0/src/hebog/validation/component_calibration.py +141 -0
- hebog-0.22.0/src/hebog/validation/contracts.py +724 -0
- hebog-0.22.0/src/hebog/validation/datasets.py +1159 -0
- hebog-0.22.0/src/hebog/validation/evidence.py +526 -0
- hebog-0.22.0/src/hebog/validation/execution_profile.py +692 -0
- hebog-0.22.0/src/hebog/validation/external_runners.py +188 -0
- hebog-0.22.0/src/hebog/validation/filter_benchmark.py +159 -0
- hebog-0.22.0/src/hebog/validation/lsmtool_filter.py +569 -0
- hebog-0.22.0/src/hebog/validation/materialization.py +383 -0
- hebog-0.22.0/src/hebog/validation/overhead.py +135 -0
- hebog-0.22.0/src/hebog/validation/products.py +824 -0
- hebog-0.22.0/src/hebog/validation/profile_cluster.py +49 -0
- hebog-0.22.0/src/hebog/validation/public_measurement_projection.py +254 -0
- hebog-0.22.0/src/hebog/validation/quick_benchmark.py +610 -0
- hebog-0.22.0/src/hebog/validation/quick_check.py +1010 -0
- hebog-0.22.0/src/hebog/validation/rapthor_agreement.py +769 -0
- hebog-0.22.0/src/hebog/validation/remote_cutouts.py +197 -0
- hebog-0.22.0/src/hebog/validation/scaling_profile.py +267 -0
- hebog-0.22.0/src/hebog/validation/support_diagnostics.py +428 -0
- hebog-0.22.0/src/hebog/validation/support_plotting.py +493 -0
- hebog-0.22.0/src/hebog/validation/task_memory_audit.py +166 -0
- hebog-0.22.0/src/hebog/validation/task_recording.py +238 -0
- hebog-0.22.0/src/hebog/validation/tiled_detection.py +232 -0
- hebog-0.22.0/src/hebog/validation/traced_attribution.py +280 -0
- hebog-0.22.0/src/hebog/validation/traced_peak.py +227 -0
hebog-0.22.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Gemma Danks
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
hebog-0.22.0/PKG-INFO
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hebog
|
|
3
|
+
Version: 0.22.0
|
|
4
|
+
Summary: A scalable source finder for radio continuum images
|
|
5
|
+
Author: Gemma Danks
|
|
6
|
+
Author-email: Gemma Danks <gemma.danks@skao.int>
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
12
|
+
Requires-Dist: astropy>=8.0.1,<9
|
|
13
|
+
Requires-Dist: distributed>=2026.7.1,<2027
|
|
14
|
+
Requires-Dist: numpy>=2.0.2,<3
|
|
15
|
+
Requires-Dist: pydantic>=2.12,<3
|
|
16
|
+
Requires-Dist: scipy>=1.15,<2
|
|
17
|
+
Requires-Dist: zarr>=3.2,<3.3
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Project-URL: Homepage, https://open-research.gemmadanks.com/hebog/
|
|
20
|
+
Project-URL: Documentation, https://open-research.gemmadanks.com/hebog/
|
|
21
|
+
Project-URL: Repository, https://github.com/gemmadanks/hebog
|
|
22
|
+
Project-URL: Issues, https://github.com/gemmadanks/hebog/issues
|
|
23
|
+
Project-URL: Changelog, https://github.com/gemmadanks/hebog/releases
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Hebog
|
|
27
|
+
|
|
28
|
+
[](https://github.com/gemmadanks/hebog/actions/workflows/ci.yaml)
|
|
29
|
+
[](https://github.com/gemmadanks/hebog/actions/workflows/release-please.yaml)
|
|
30
|
+
[](https://open-research.gemmadanks.com/hebog/)
|
|
31
|
+
[](https://codecov.io/gh/gemmadanks/hebog)
|
|
32
|
+
[](https://github.com/gemmadanks/hebog/blob/main/LICENSE)
|
|
33
|
+
|
|
34
|
+
Hebog is a scalable source finder for radio continuum images. It is
|
|
35
|
+
**experimental**, and runs in a single process or on a Dask cluster. For each FITS image it:
|
|
36
|
+
|
|
37
|
+
1. estimates the background and noise;
|
|
38
|
+
2. detects compact and extended emission;
|
|
39
|
+
3. separates, fits and measures sources; and
|
|
40
|
+
4. publishes a source catalogue, a noise (RMS) image, a source mask and
|
|
41
|
+
diagnostics.
|
|
42
|
+
|
|
43
|
+
[How Hebog finds sources](https://open-research.gemmadanks.com/hebog/explanation/how-hebog-works/)
|
|
44
|
+
explains each step with diagrams.
|
|
45
|
+
|
|
46
|
+
Hebog aims to be a fast, scalable source finder that is easily integrated into
|
|
47
|
+
next generation radio astronomy data processing pipelines such as
|
|
48
|
+
[Rapthor](https://github.com/darafferty/rapthor). It can also be used on its own from Python.
|
|
49
|
+
|
|
50
|
+
## Status
|
|
51
|
+
|
|
52
|
+
- **Experimental.** Releases are `0.x` and may change the API or output
|
|
53
|
+
formats. Pin an exact version and read the
|
|
54
|
+
[release notes](https://github.com/gemmadanks/hebog/releases) before
|
|
55
|
+
upgrading.
|
|
56
|
+
- **Not yet scientifically qualified.** Hebog is compared against
|
|
57
|
+
[PyBDSF](https://github.com/lofar-astron/PyBDSF) and
|
|
58
|
+
[Aegean](https://github.com/PaulHancock/Aegean) on simulated images with
|
|
59
|
+
known sources, but these checks are development evidence rather than qualification
|
|
60
|
+
for survey use. See
|
|
61
|
+
[scientific status](https://open-research.gemmadanks.com/hebog/reference/release-status/#scientific-status).
|
|
62
|
+
- **Supported inputs:** one FITS image in `Jy/beam` with ICRS or FK5 J2000 sky
|
|
63
|
+
coordinates and at most 15,402 pixels on each side.
|
|
64
|
+
|
|
65
|
+
[Current capability and release status](https://open-research.gemmadanks.com/hebog/reference/release-status/)
|
|
66
|
+
lists the full input requirements and known limitations, and
|
|
67
|
+
[progress against goals](https://open-research.gemmadanks.com/hebog/reference/progress-against-goals/)
|
|
68
|
+
summarises on one page where development stands against the project's
|
|
69
|
+
telescope, Rapthor, science, performance, scalability and release goals.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
Hebog is experimental: `0.x` releases can change the API, the outputs and
|
|
74
|
+
the measurements, so pin the exact version. Install it from
|
|
75
|
+
[PyPI](https://pypi.org/project/hebog/) into a Python 3.12 to 3.14
|
|
76
|
+
environment (releases before 0.22.0 are on GitHub only):
|
|
77
|
+
|
|
78
|
+
<!-- x-release-please-start-version -->
|
|
79
|
+
|
|
80
|
+
```shell
|
|
81
|
+
pip install hebog==0.22.0
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
<!-- x-release-please-end -->
|
|
85
|
+
|
|
86
|
+
## Example
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from pathlib import Path
|
|
90
|
+
|
|
91
|
+
from hebog import SourceFinderConfig, SourceFinderRequest, find_sources
|
|
92
|
+
from hebog.executors import SerialExecutor
|
|
93
|
+
|
|
94
|
+
request = SourceFinderRequest(
|
|
95
|
+
image_path=Path("image.fits"),
|
|
96
|
+
output_directory=Path("output"),
|
|
97
|
+
run_id="example",
|
|
98
|
+
)
|
|
99
|
+
config = SourceFinderConfig(
|
|
100
|
+
detection_threshold_sigma=5.0,
|
|
101
|
+
island_threshold_sigma=3.0,
|
|
102
|
+
minimum_island_pixels=7,
|
|
103
|
+
)
|
|
104
|
+
result = find_sources(request, config, SerialExecutor())
|
|
105
|
+
print(result.catalogue_path, result.source_count)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The output directory must not already exist; running the same request again
|
|
109
|
+
returns the products already there. The
|
|
110
|
+
[source-finding tutorial](https://open-research.gemmadanks.com/hebog/tutorials/find-sources/)
|
|
111
|
+
explains the settings, the products and how to run on Dask.
|
|
112
|
+
|
|
113
|
+
## Documentation
|
|
114
|
+
|
|
115
|
+
- [FAQ for astronomers](https://open-research.gemmadanks.com/hebog/explanation/astronomer-faq/)
|
|
116
|
+
- [Find sources in a FITS image](https://open-research.gemmadanks.com/hebog/tutorials/find-sources/)
|
|
117
|
+
- [How Hebog finds sources](https://open-research.gemmadanks.com/hebog/explanation/how-hebog-works/)
|
|
118
|
+
- [Hebog and other source finders](https://open-research.gemmadanks.com/hebog/explanation/source-finder-comparison/)
|
|
119
|
+
- [Catalogue, image and diagnostic outputs](https://open-research.gemmadanks.com/hebog/reference/public-products/)
|
|
120
|
+
- [Interactive notebooks](https://open-research.gemmadanks.com/hebog/how-to/notebooks/)
|
|
121
|
+
- [FAQ for developers and architects](https://open-research.gemmadanks.com/hebog/explanation/developer-faq/)
|
|
122
|
+
- [Architecture](https://open-research.gemmadanks.com/hebog/architecture/)
|
|
123
|
+
- [How Hebog distributes work](https://open-research.gemmadanks.com/hebog/architecture/distributed-execution/)
|
|
124
|
+
- [Integrate Hebog into a pipeline](https://open-research.gemmadanks.com/hebog/how-to/integrate-into-a-pipeline/)
|
|
125
|
+
- [API reference](https://open-research.gemmadanks.com/hebog/reference/)
|
|
126
|
+
|
|
127
|
+
## Development
|
|
128
|
+
|
|
129
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and
|
|
130
|
+
[just](https://just.systems/), then:
|
|
131
|
+
|
|
132
|
+
```shell
|
|
133
|
+
git clone https://github.com/gemmadanks/hebog.git
|
|
134
|
+
cd hebog
|
|
135
|
+
uv sync --all-groups
|
|
136
|
+
just check # formatting, linting, type checks and fast tests
|
|
137
|
+
just --list # all test, documentation and packaging commands
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Contributions use [Conventional Commits](https://www.conventionalcommits.org/).
|
|
141
|
+
[AGENTS.md](https://github.com/gemmadanks/hebog/blob/main/AGENTS.md) describes
|
|
142
|
+
the project's working rules, test suites and review checklist.
|
|
143
|
+
|
|
144
|
+
## Citation and licence
|
|
145
|
+
|
|
146
|
+
If Hebog contributes to your research, please cite it using
|
|
147
|
+
[CITATION.cff](https://github.com/gemmadanks/hebog/blob/main/CITATION.cff).
|
|
148
|
+
Hebog is distributed under the
|
|
149
|
+
[BSD 3-Clause License](https://github.com/gemmadanks/hebog/blob/main/LICENSE).
|
hebog-0.22.0/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Hebog
|
|
2
|
+
|
|
3
|
+
[](https://github.com/gemmadanks/hebog/actions/workflows/ci.yaml)
|
|
4
|
+
[](https://github.com/gemmadanks/hebog/actions/workflows/release-please.yaml)
|
|
5
|
+
[](https://open-research.gemmadanks.com/hebog/)
|
|
6
|
+
[](https://codecov.io/gh/gemmadanks/hebog)
|
|
7
|
+
[](https://github.com/gemmadanks/hebog/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
Hebog is a scalable source finder for radio continuum images. It is
|
|
10
|
+
**experimental**, and runs in a single process or on a Dask cluster. For each FITS image it:
|
|
11
|
+
|
|
12
|
+
1. estimates the background and noise;
|
|
13
|
+
2. detects compact and extended emission;
|
|
14
|
+
3. separates, fits and measures sources; and
|
|
15
|
+
4. publishes a source catalogue, a noise (RMS) image, a source mask and
|
|
16
|
+
diagnostics.
|
|
17
|
+
|
|
18
|
+
[How Hebog finds sources](https://open-research.gemmadanks.com/hebog/explanation/how-hebog-works/)
|
|
19
|
+
explains each step with diagrams.
|
|
20
|
+
|
|
21
|
+
Hebog aims to be a fast, scalable source finder that is easily integrated into
|
|
22
|
+
next generation radio astronomy data processing pipelines such as
|
|
23
|
+
[Rapthor](https://github.com/darafferty/rapthor). It can also be used on its own from Python.
|
|
24
|
+
|
|
25
|
+
## Status
|
|
26
|
+
|
|
27
|
+
- **Experimental.** Releases are `0.x` and may change the API or output
|
|
28
|
+
formats. Pin an exact version and read the
|
|
29
|
+
[release notes](https://github.com/gemmadanks/hebog/releases) before
|
|
30
|
+
upgrading.
|
|
31
|
+
- **Not yet scientifically qualified.** Hebog is compared against
|
|
32
|
+
[PyBDSF](https://github.com/lofar-astron/PyBDSF) and
|
|
33
|
+
[Aegean](https://github.com/PaulHancock/Aegean) on simulated images with
|
|
34
|
+
known sources, but these checks are development evidence rather than qualification
|
|
35
|
+
for survey use. See
|
|
36
|
+
[scientific status](https://open-research.gemmadanks.com/hebog/reference/release-status/#scientific-status).
|
|
37
|
+
- **Supported inputs:** one FITS image in `Jy/beam` with ICRS or FK5 J2000 sky
|
|
38
|
+
coordinates and at most 15,402 pixels on each side.
|
|
39
|
+
|
|
40
|
+
[Current capability and release status](https://open-research.gemmadanks.com/hebog/reference/release-status/)
|
|
41
|
+
lists the full input requirements and known limitations, and
|
|
42
|
+
[progress against goals](https://open-research.gemmadanks.com/hebog/reference/progress-against-goals/)
|
|
43
|
+
summarises on one page where development stands against the project's
|
|
44
|
+
telescope, Rapthor, science, performance, scalability and release goals.
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
Hebog is experimental: `0.x` releases can change the API, the outputs and
|
|
49
|
+
the measurements, so pin the exact version. Install it from
|
|
50
|
+
[PyPI](https://pypi.org/project/hebog/) into a Python 3.12 to 3.14
|
|
51
|
+
environment (releases before 0.22.0 are on GitHub only):
|
|
52
|
+
|
|
53
|
+
<!-- x-release-please-start-version -->
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
pip install hebog==0.22.0
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
<!-- x-release-please-end -->
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from pathlib import Path
|
|
65
|
+
|
|
66
|
+
from hebog import SourceFinderConfig, SourceFinderRequest, find_sources
|
|
67
|
+
from hebog.executors import SerialExecutor
|
|
68
|
+
|
|
69
|
+
request = SourceFinderRequest(
|
|
70
|
+
image_path=Path("image.fits"),
|
|
71
|
+
output_directory=Path("output"),
|
|
72
|
+
run_id="example",
|
|
73
|
+
)
|
|
74
|
+
config = SourceFinderConfig(
|
|
75
|
+
detection_threshold_sigma=5.0,
|
|
76
|
+
island_threshold_sigma=3.0,
|
|
77
|
+
minimum_island_pixels=7,
|
|
78
|
+
)
|
|
79
|
+
result = find_sources(request, config, SerialExecutor())
|
|
80
|
+
print(result.catalogue_path, result.source_count)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The output directory must not already exist; running the same request again
|
|
84
|
+
returns the products already there. The
|
|
85
|
+
[source-finding tutorial](https://open-research.gemmadanks.com/hebog/tutorials/find-sources/)
|
|
86
|
+
explains the settings, the products and how to run on Dask.
|
|
87
|
+
|
|
88
|
+
## Documentation
|
|
89
|
+
|
|
90
|
+
- [FAQ for astronomers](https://open-research.gemmadanks.com/hebog/explanation/astronomer-faq/)
|
|
91
|
+
- [Find sources in a FITS image](https://open-research.gemmadanks.com/hebog/tutorials/find-sources/)
|
|
92
|
+
- [How Hebog finds sources](https://open-research.gemmadanks.com/hebog/explanation/how-hebog-works/)
|
|
93
|
+
- [Hebog and other source finders](https://open-research.gemmadanks.com/hebog/explanation/source-finder-comparison/)
|
|
94
|
+
- [Catalogue, image and diagnostic outputs](https://open-research.gemmadanks.com/hebog/reference/public-products/)
|
|
95
|
+
- [Interactive notebooks](https://open-research.gemmadanks.com/hebog/how-to/notebooks/)
|
|
96
|
+
- [FAQ for developers and architects](https://open-research.gemmadanks.com/hebog/explanation/developer-faq/)
|
|
97
|
+
- [Architecture](https://open-research.gemmadanks.com/hebog/architecture/)
|
|
98
|
+
- [How Hebog distributes work](https://open-research.gemmadanks.com/hebog/architecture/distributed-execution/)
|
|
99
|
+
- [Integrate Hebog into a pipeline](https://open-research.gemmadanks.com/hebog/how-to/integrate-into-a-pipeline/)
|
|
100
|
+
- [API reference](https://open-research.gemmadanks.com/hebog/reference/)
|
|
101
|
+
|
|
102
|
+
## Development
|
|
103
|
+
|
|
104
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and
|
|
105
|
+
[just](https://just.systems/), then:
|
|
106
|
+
|
|
107
|
+
```shell
|
|
108
|
+
git clone https://github.com/gemmadanks/hebog.git
|
|
109
|
+
cd hebog
|
|
110
|
+
uv sync --all-groups
|
|
111
|
+
just check # formatting, linting, type checks and fast tests
|
|
112
|
+
just --list # all test, documentation and packaging commands
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Contributions use [Conventional Commits](https://www.conventionalcommits.org/).
|
|
116
|
+
[AGENTS.md](https://github.com/gemmadanks/hebog/blob/main/AGENTS.md) describes
|
|
117
|
+
the project's working rules, test suites and review checklist.
|
|
118
|
+
|
|
119
|
+
## Citation and licence
|
|
120
|
+
|
|
121
|
+
If Hebog contributes to your research, please cite it using
|
|
122
|
+
[CITATION.cff](https://github.com/gemmadanks/hebog/blob/main/CITATION.cff).
|
|
123
|
+
Hebog is distributed under the
|
|
124
|
+
[BSD 3-Clause License](https://github.com/gemmadanks/hebog/blob/main/LICENSE).
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "hebog"
|
|
3
|
+
version = "0.22.0"
|
|
4
|
+
description = "A scalable source finder for radio continuum images"
|
|
5
|
+
license = "BSD-3-Clause"
|
|
6
|
+
license-files = ["LICENSE"]
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.12"
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 3 - Alpha",
|
|
11
|
+
"Intended Audience :: Science/Research",
|
|
12
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
13
|
+
]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"astropy>=8.0.1,<9",
|
|
16
|
+
"distributed>=2026.7.1,<2027",
|
|
17
|
+
"numpy>=2.0.2,<3",
|
|
18
|
+
"pydantic>=2.12,<3",
|
|
19
|
+
"scipy>=1.15,<2",
|
|
20
|
+
"zarr>=3.2,<3.3",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[[project.authors]]
|
|
24
|
+
name = "Gemma Danks"
|
|
25
|
+
email = "gemma.danks@skao.int"
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://open-research.gemmadanks.com/hebog/"
|
|
29
|
+
Documentation = "https://open-research.gemmadanks.com/hebog/"
|
|
30
|
+
Repository = "https://github.com/gemmadanks/hebog"
|
|
31
|
+
Issues = "https://github.com/gemmadanks/hebog/issues"
|
|
32
|
+
Changelog = "https://github.com/gemmadanks/hebog/releases"
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
hebog = "hebog.cli:main"
|
|
36
|
+
|
|
37
|
+
[dependency-groups]
|
|
38
|
+
dev = [
|
|
39
|
+
"marimo>=0.23.15",
|
|
40
|
+
"pytest>=9.1.1,<10.0.0",
|
|
41
|
+
"pytest-benchmark>=5.1,<6",
|
|
42
|
+
"ruff>=0.16.0,<0.17.0",
|
|
43
|
+
"pre-commit>=4.6.1,<5.0.0",
|
|
44
|
+
"pyright>=1.1.411,<2.0.0",
|
|
45
|
+
"pytest-cov>=7.1.0,<8.0.0",
|
|
46
|
+
"pytest-mock>=3.15,<4",
|
|
47
|
+
"hypothesis>=6.163.0,<7",
|
|
48
|
+
"matplotlib>=3.11,<4",
|
|
49
|
+
"pytest-xdist>=3.8,<4",
|
|
50
|
+
"pytest-split>=0.11,<0.12",
|
|
51
|
+
]
|
|
52
|
+
docs = [
|
|
53
|
+
"mkdocs",
|
|
54
|
+
"mkdocstrings[python]",
|
|
55
|
+
"mkdocs-material",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[tool.coverage.run]
|
|
59
|
+
branch = true
|
|
60
|
+
source = ["src/hebog"]
|
|
61
|
+
omit = [
|
|
62
|
+
"tests/*",
|
|
63
|
+
"conftest.py",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[tool.coverage.report]
|
|
67
|
+
fail_under = 80
|
|
68
|
+
show_missing = true
|
|
69
|
+
|
|
70
|
+
[tool.pytest.ini_options]
|
|
71
|
+
addopts = "--strict-markers"
|
|
72
|
+
testpaths = ["tests"]
|
|
73
|
+
xfail_strict = true
|
|
74
|
+
filterwarnings = [
|
|
75
|
+
"error",
|
|
76
|
+
"ignore:Benchmarks are automatically disabled:pytest_benchmark.logger.PytestBenchmarkWarning",
|
|
77
|
+
"ignore:Creating scratch directories is taking a surprisingly long time:UserWarning",
|
|
78
|
+
]
|
|
79
|
+
markers = [
|
|
80
|
+
"acceptance: Rapthor-facing behaviour scenarios",
|
|
81
|
+
"benchmark: performance regression and scaling tests",
|
|
82
|
+
"contract: scheduler-independent public behaviour and product contracts",
|
|
83
|
+
"equivalence: scientific comparisons with PyBDSF reference products",
|
|
84
|
+
"integration: Dask, FITS, and Rapthor integration tests",
|
|
85
|
+
"qualification: held-out scientific validation for milestone and release gates",
|
|
86
|
+
"requires_data: tests requiring external or non-redistributable datasets",
|
|
87
|
+
"scalability: controlled large-image and multi-node scaling tests",
|
|
88
|
+
"slow: tests excluded from the fast development and pull-request suites",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[tool.pyright]
|
|
92
|
+
include = [
|
|
93
|
+
"src",
|
|
94
|
+
"tests",
|
|
95
|
+
]
|
|
96
|
+
pythonVersion = "3.12"
|
|
97
|
+
typeCheckingMode = "strict"
|
|
98
|
+
|
|
99
|
+
[tool.ruff]
|
|
100
|
+
line-length = 79
|
|
101
|
+
src = [
|
|
102
|
+
"src",
|
|
103
|
+
"tests",
|
|
104
|
+
]
|
|
105
|
+
extend-exclude = ["benchmark-results"]
|
|
106
|
+
|
|
107
|
+
[tool.ruff.lint]
|
|
108
|
+
select = [
|
|
109
|
+
"ARG",
|
|
110
|
+
"B",
|
|
111
|
+
"C4",
|
|
112
|
+
"C90",
|
|
113
|
+
"E",
|
|
114
|
+
"F",
|
|
115
|
+
"I",
|
|
116
|
+
"N",
|
|
117
|
+
"PERF",
|
|
118
|
+
"PL",
|
|
119
|
+
"RUF",
|
|
120
|
+
"SIM",
|
|
121
|
+
"W",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
[tool.ruff.lint.isort]
|
|
125
|
+
known-first-party = ["hebog"]
|
|
126
|
+
|
|
127
|
+
[tool.ruff.lint.per-file-ignores]
|
|
128
|
+
"notebooks/**" = [
|
|
129
|
+
"PLC0415",
|
|
130
|
+
"PLR0913",
|
|
131
|
+
"PLR0917",
|
|
132
|
+
"PLR1711",
|
|
133
|
+
]
|
|
134
|
+
"tests/**" = ["PLR2004"]
|
|
135
|
+
|
|
136
|
+
[tool.uv.build-backend]
|
|
137
|
+
module-name = "hebog"
|
|
138
|
+
module-root = "src"
|
|
139
|
+
wheel-exclude = ["hebog/validation"]
|
|
140
|
+
|
|
141
|
+
[build-system]
|
|
142
|
+
requires = ["uv-build>=0.12.1,<0.13"]
|
|
143
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "hebog"
|
|
3
|
+
version = "0.22.0"
|
|
4
|
+
description = "A scalable source finder for radio continuum images"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Gemma Danks", email = "gemma.danks@skao.int"},
|
|
7
|
+
]
|
|
8
|
+
license = "BSD-3-Clause"
|
|
9
|
+
license-files = ["LICENSE"]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.12"
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Science/Research",
|
|
15
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"astropy>=8.0.1,<9",
|
|
19
|
+
"distributed>=2026.7.1,<2027",
|
|
20
|
+
"numpy>=2.0.2,<3",
|
|
21
|
+
"pydantic>=2.12,<3",
|
|
22
|
+
"scipy>=1.15,<2",
|
|
23
|
+
"zarr>=3.2,<3.3",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://open-research.gemmadanks.com/hebog/"
|
|
28
|
+
Documentation = "https://open-research.gemmadanks.com/hebog/"
|
|
29
|
+
Repository = "https://github.com/gemmadanks/hebog"
|
|
30
|
+
Issues = "https://github.com/gemmadanks/hebog/issues"
|
|
31
|
+
Changelog = "https://github.com/gemmadanks/hebog/releases"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
hebog = "hebog.cli:main"
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = [
|
|
38
|
+
"marimo>=0.23.15",
|
|
39
|
+
"pytest>=9.1.1,<10.0.0",
|
|
40
|
+
"pytest-benchmark>=5.1,<6",
|
|
41
|
+
"ruff>=0.16.0,<0.17.0",
|
|
42
|
+
"pre-commit>=4.6.1,<5.0.0",
|
|
43
|
+
"pyright>=1.1.411,<2.0.0",
|
|
44
|
+
"pytest-cov>=7.1.0,<8.0.0",
|
|
45
|
+
"pytest-mock>=3.15,<4",
|
|
46
|
+
"hypothesis>=6.163.0,<7",
|
|
47
|
+
"matplotlib>=3.11,<4",
|
|
48
|
+
"pytest-xdist>=3.8,<4",
|
|
49
|
+
"pytest-split>=0.11,<0.12",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
docs = [
|
|
53
|
+
"mkdocs",
|
|
54
|
+
"mkdocstrings[python]",
|
|
55
|
+
"mkdocs-material"
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
[tool.coverage.run]
|
|
60
|
+
branch = true
|
|
61
|
+
source = ["src/hebog"]
|
|
62
|
+
omit = [
|
|
63
|
+
"tests/*",
|
|
64
|
+
"conftest.py"
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[tool.coverage.report]
|
|
68
|
+
fail_under = 80
|
|
69
|
+
show_missing = true
|
|
70
|
+
|
|
71
|
+
[tool.pytest.ini_options]
|
|
72
|
+
addopts = "--strict-markers"
|
|
73
|
+
testpaths = ["tests"]
|
|
74
|
+
xfail_strict = true
|
|
75
|
+
filterwarnings = [
|
|
76
|
+
"error",
|
|
77
|
+
# pytest-benchmark warns at start-up that xdist disables it. No test
|
|
78
|
+
# uses its fixture.
|
|
79
|
+
"ignore:Benchmarks are automatically disabled:pytest_benchmark.logger.PytestBenchmarkWarning",
|
|
80
|
+
# Distributed warns when a worker's scratch directory takes over a second
|
|
81
|
+
# to create, which depends on the machine's load, not on the test.
|
|
82
|
+
"ignore:Creating scratch directories is taking a surprisingly long time:UserWarning",
|
|
83
|
+
]
|
|
84
|
+
markers = [
|
|
85
|
+
"acceptance: Rapthor-facing behaviour scenarios",
|
|
86
|
+
"benchmark: performance regression and scaling tests",
|
|
87
|
+
"contract: scheduler-independent public behaviour and product contracts",
|
|
88
|
+
"equivalence: scientific comparisons with PyBDSF reference products",
|
|
89
|
+
"integration: Dask, FITS, and Rapthor integration tests",
|
|
90
|
+
"qualification: held-out scientific validation for milestone and release gates",
|
|
91
|
+
"requires_data: tests requiring external or non-redistributable datasets",
|
|
92
|
+
"scalability: controlled large-image and multi-node scaling tests",
|
|
93
|
+
"slow: tests excluded from the fast development and pull-request suites",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[tool.pyright]
|
|
97
|
+
include = ["src", "tests"]
|
|
98
|
+
pythonVersion = "3.12"
|
|
99
|
+
typeCheckingMode = "strict"
|
|
100
|
+
|
|
101
|
+
[tool.ruff]
|
|
102
|
+
line-length = 79
|
|
103
|
+
src = ["src", "tests"]
|
|
104
|
+
extend-exclude = ["benchmark-results"]
|
|
105
|
+
|
|
106
|
+
[tool.ruff.lint]
|
|
107
|
+
select = [
|
|
108
|
+
"ARG",
|
|
109
|
+
"B",
|
|
110
|
+
"C4",
|
|
111
|
+
"C90",
|
|
112
|
+
"E",
|
|
113
|
+
"F",
|
|
114
|
+
"I",
|
|
115
|
+
"N",
|
|
116
|
+
"PERF",
|
|
117
|
+
"PL",
|
|
118
|
+
"RUF",
|
|
119
|
+
"SIM",
|
|
120
|
+
"W",
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
[tool.ruff.lint.isort]
|
|
124
|
+
known-first-party = ["hebog"]
|
|
125
|
+
|
|
126
|
+
[tool.ruff.lint.per-file-ignores]
|
|
127
|
+
"notebooks/**" = ["PLC0415", "PLR0913", "PLR0917", "PLR1711"]
|
|
128
|
+
"tests/**" = ["PLR2004"]
|
|
129
|
+
|
|
130
|
+
[build-system]
|
|
131
|
+
# uv_build 0.13 writes source distributions as PAX tar archives, which uv
|
|
132
|
+
# releases before 0.13 cannot extract, so building or installing the sdist
|
|
133
|
+
# with an older uv fails. Lift the cap only when every supported installer
|
|
134
|
+
# reads them.
|
|
135
|
+
requires = ["uv-build>=0.12.1,<0.13"]
|
|
136
|
+
build-backend = "uv_build"
|
|
137
|
+
|
|
138
|
+
[tool.uv.build-backend]
|
|
139
|
+
module-name = "hebog"
|
|
140
|
+
module-root = "src"
|
|
141
|
+
# Campaign and comparison tooling runs from a source checkout with the
|
|
142
|
+
# development dependencies; it is not part of the installed source finder.
|
|
143
|
+
wheel-exclude = ["hebog/validation"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""A scalable source finder for radio continuum images."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
from hebog.config import SourceFinderConfig
|
|
6
|
+
from hebog.data_models import (
|
|
7
|
+
SourceFinderRequest,
|
|
8
|
+
SourceFinderResult,
|
|
9
|
+
SuppliedImageMetadata,
|
|
10
|
+
)
|
|
11
|
+
from hebog.pipeline import (
|
|
12
|
+
InvalidSourceFinderInputError,
|
|
13
|
+
SourceFinderError,
|
|
14
|
+
SourceFinderImageTooLargeError,
|
|
15
|
+
SourceFinderOutputExistsError,
|
|
16
|
+
SourceFinderStagingWarning,
|
|
17
|
+
UnsupportedSourceFinderConfigurationError,
|
|
18
|
+
analysis_memory_bytes,
|
|
19
|
+
expected_source_count,
|
|
20
|
+
find_sources,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
__version__ = version("hebog")
|
|
25
|
+
except PackageNotFoundError:
|
|
26
|
+
__version__ = "0.22.0"
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"InvalidSourceFinderInputError",
|
|
30
|
+
"SourceFinderConfig",
|
|
31
|
+
"SourceFinderError",
|
|
32
|
+
"SourceFinderImageTooLargeError",
|
|
33
|
+
"SourceFinderOutputExistsError",
|
|
34
|
+
"SourceFinderRequest",
|
|
35
|
+
"SourceFinderResult",
|
|
36
|
+
"SourceFinderStagingWarning",
|
|
37
|
+
"SuppliedImageMetadata",
|
|
38
|
+
"UnsupportedSourceFinderConfigurationError",
|
|
39
|
+
"__version__",
|
|
40
|
+
"analysis_memory_bytes",
|
|
41
|
+
"expected_source_count",
|
|
42
|
+
"find_sources",
|
|
43
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Workflow compatibility boundaries built on Hebog's scientific API."""
|
|
2
|
+
|
|
3
|
+
from hebog.adapters.rapthor import (
|
|
4
|
+
RapthorBlankedImageError,
|
|
5
|
+
RapthorCompatibilityConfig,
|
|
6
|
+
RapthorSourceFindingRequest,
|
|
7
|
+
RapthorSourceFindingResult,
|
|
8
|
+
find_sector_sources,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"RapthorBlankedImageError",
|
|
13
|
+
"RapthorCompatibilityConfig",
|
|
14
|
+
"RapthorSourceFindingRequest",
|
|
15
|
+
"RapthorSourceFindingResult",
|
|
16
|
+
"find_sector_sources",
|
|
17
|
+
]
|