SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.02701 · 2018

DeepSource: Point Source Detection using Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1807.02701.json · badge: /api/ran/1807.02701.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
vafaei-ar/deepsource canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
cent_of_mass Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/ps_extract.py
code served (permissive licence) · get_code("69c704d0836ada76")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small test image (4x3)
d = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0],
    [10.0, 11.0, 12.0]
], dtype=np.float32)

# Create a logical filter marking object pixels (True where object exists)
filt = np.array([
    [True, False, True],
    [False, True, False],
    [True, False, True],
    [False, True, False]
], dtype=bool)

ARGS = {
    'd': d,
    'filt': filt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_file_paths Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/cross_match.py
code served (permissive licence) · get_code("d695e3329614fe1e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import logging

# Set up logging to see the info messages
logging.basicConfig(level=logging.INFO)

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()

# Create some test files with valid extensions
valid_file_1 = os.path.join(temp_dir, "test_file_1.txt")
valid_file_2 = os.path.join(temp_dir, "test_file_2.csv")
invalid_file = os.path.join(temp_dir, "test_file_3.xyz")

with open(valid_file_1, 'w') as f:
    f.write("test content 1")

with open(valid_file_2, 'w') as f:
    f.write("test content 2")

with open(invalid_file, 'w') as f:
    f.write("test content 3")

# Define the arguments for the function
ARGS = {
    'root_dir': temp_dir,
    'valid_extensions': ['.txt', '.csv']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ps_blob_detect Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/ps_extract.py
code served (permissive licence) · get_code("0efb923be32b79ff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (1, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small synthetic image with some blob-like structures
np.random.seed(0)
xp = np.random.rand(32, 32) * 0.5  # Base noise
# Add some bright blob regions
xp[8:12, 8:12] += 0.7
xp[20:24, 20:24] += 0.6
xp[5:8, 20:23] += 0.5

ARGS = {
    'xp': xp,
    'loc_det': 'mean',
    'jump_lim': 50,
    'area_lim': 10,
    'threshold_0': 1.0,
    'return_intensity': False,
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (1, 2) — shape (1, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ps_extract Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/ps_extract.py
code served (permissive licence) · get_code("3bd4361b4c26cae5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (0, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch
import torch.nn as nn
from unittest.mock import Mock

torch.manual_seed(0)

# Create a minimal CNN model that implements the required method
class MinimalCNN(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 8, kernel_size=3, padding=1)
    
    def forward(self, x):
        return self.conv1(x)
    
    def conv_large_image(self, data, pad=10, lx=400):
        """
        Simulates processing a large image by returning a smaller prediction map.
        data shape: (batch, height, width, channels)
        Returns a 2D prediction map normalized to [0, 1]
        """
        # Extract first batch and first channel
        img = data[0, :, :, 0]
        # Downsample to simulate processing
        h, w = img.shape
        out_h = max(10, h // 4)
        out_w = max(10, w // 4)
        # Create a simple prediction map with some peaks
        pred_map = np.random.rand(out_h, out_w) * 0.5
        # Add some bright spots to simulate detectable blobs
        pred_map[2:5, 2:5] = 0.8
        pred_map[6:9, 6:9] = 0.7
        return pred_map

# Create a minimal fetch function
def mock_fetch_func(image_file, model_file):
    """
    Mock fetch function that returns dummy data.
    Returns: (data, _, _) where data shape is (batch, height, width, channels)
    """
    # Create synthetic image data with some structure
    data = np.random.rand(1, 1600, 1600, 1) * 0.3
    # Add some bright regions to detect
    data[0, 400:450, 400:450, 0] = 0.9
    data[0, 800:820, 800:820, 0] = 0.85
    return data, None, None

# Build the ARGS dictionary
ARGS = {
    'image_file': '/mock/image.fits',
    'model_file': '/mock/model.pth',
    'cnn': MinimalCNN(),
    'fetch_func': mock_fetch_func,
    'loc_det': 'mean',
    'ignore_border': 600,
    'jump_lim': 50,
    'area_lim': 10,
    'threshold_0': 1.0,
    'lw': 400,
    'pad': 10,
    'verbose': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (0, 4) — shape (0, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
standard Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/util.py
code served (permissive licence) · get_code("efb925c439171eeb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (8,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

torch_manual_seed = 0
np.random.seed(0)

# Create a small numpy array with values that need standardization
# Range from 5 to 15 so min/max operations are meaningful
X = np.array([5.0, 7.5, 10.0, 12.5, 15.0, 8.0, 11.0, 6.0])

ARGS = {
    "X": X
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (8,) — shape (8,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
standard Ran
ran on a synthesized input
vafaei-ar/deepsource/deepsource/utils.py
code served (permissive licence) · get_code("e675f35965e11045")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small numpy array with distinct values for testing
X = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]], dtype=np.float32)

ARGS = {
    "X": X
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
architecture Not yet run
unverified (harvested, no recorded run)
vafaei-ar/deepsource/script/arch.py
code served (permissive licence) · get_code("d1385f8e0a3fd2cd")
How it ran

no invocation recorded.

get_matching_model_path Not yet run
unverified (harvested, no recorded run)
vafaei-ar/deepsource/deepsource/cross_match.py
code served (permissive licence) · get_code("931786818701a7b3")
How it ran

no invocation recorded.

wavelet Not yet run
unverified (harvested, no recorded run)
vafaei-ar/deepsource/deepsource/preprocessors.py
code served (permissive licence) · get_code("4d6276b952044468")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Point source detection at low signal-to-noise is challenging for astronomical surveys, particularly in radio interferometry images where the noise is correlated. Machine learning is a promising solution, allowing the development of algorithms tailored to specific telescope arrays and science cases. We present DeepSource - a deep learning solution - that uses convolutional neural networks to achieve these goals. DeepSource enhances the Signal-to-Noise Ratio (SNR) of the original map and then uses dynamic blob detection to detect sources. Trained and tested on two sets of 500 simulated 1 deg x 1 deg MeerKAT images with a total of 300,000 sources, DeepSource is essentially perfect in both purity and completeness down to SNR = 4 and outperforms PyBDSF in all metrics. For uniformly-weighted images it achieves a Purity x Completeness (PC) score at SNR = 3 of 0.73, compared to 0.31 for the best PyBDSF model. For natural-weighting we find a smaller improvement of ~40% in the PC score at SNR = 3. If instead we ask where either of the purity or completeness first drop to 90%, we find that DeepSource reaches this value at SNR = 3.6 compared to the 4.3 of PyBDSF (natural-weighting). A key advantage of DeepSource is that it can learn to optimally trade off purity and completeness for any science case under consideration. Our results show that deep learning is a promising approach to point source detection in astronomical images.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1807.02701")
get_code_for_paper("1807.02701")
have("1807.02701")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1807.02701.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1807.02701.svg)](https://syntology.ai/paper/1807.02701)

Connect an agent — have() is free.