SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2012.01426 · 2020

Stellar Population Inference with Prospector

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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, 3 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2012.01426.json · badge: /api/ran/2012.01426.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
bd-j/prospector canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
FunctionStatusWhere it lives
H Ran
ran, violated the contract we drafted
bd-j/prospector/prospect/models/sedmodel.py
code served (permissive licence) · get_code("bf31d6fc73c52184")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (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

# The function H computes a Voigt Profile Approximation
# Parameters:
# - a: damping parameter (scalar or array), typically small for Lyman-alpha (a~1e-4)
# - x: frequency offset parameter (scalar or array)

# Create small test values
a = 1e-4  # Typical damping parameter for Lyman-alpha
x = np.array([0.5, 1.0, 2.0, 3.0])  # Frequency offsets (avoiding x=0 to prevent division by zero)

ARGS = {
    'a': a,
    'x': x
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 (4,) — shape (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
gauss Ran
ran, violated the contract we drafted
bd-j/prospector/prospect/models/sedmodel.py
code served (permissive licence) · get_code("2490bc95044a18bc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (5,) 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 sample positions where we want to evaluate the Gaussians
x = np.array([0.0, 1.0, 2.0, 3.0, 4.0])

# Define centers of Gaussians (can be 1D or 2D, will be converted to 2D)
# Let's use 3 Gaussians
mu = np.array([1.0, 2.5, 3.5])

# Define amplitudes (total area under each Gaussian)
A = np.array([1.0, 2.0, 1.5])

# Define dispersions (standard deviations)
sigma = np.array([0.5, 0.8, 0.6])

ARGS = {
    'x': x,
    'mu': mu,
    'A': A,
    'sigma': sigma
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 (5,) — shape (5,) 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
ln_mvn Ran
ran, violated the contract we drafted
bd-j/prospector/prospect/models/sedmodel.py
code served (permissive licence) · get_code("965f1ae0b4887a1e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float64, ndim 0, dtype family float, shape () 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

np.random.seed(0)

# Create a small multivariate normal setup
ndim = 4

# x: a single point where we want to evaluate the PDF
x = np.array([1.0, 2.0, 3.0, 4.0])

# mean: center of the gaussian (same dimensionality as x)
mean = np.array([0.5, 1.5, 2.5, 3.5])

# cov: covariance matrix (ndim x ndim, must be positive semi-definite)
# Create a valid covariance matrix
A = np.random.randn(ndim, ndim)
cov = np.dot(A, A.T) + np.eye(ndim) * 0.1  # Ensure positive definite

ARGS = {
    'x': x,
    'mean': mean,
    'cov': cov
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () 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
lnprobfn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bd-j/prospector/prospect/fitting/fitting.py
code served (permissive licence) · get_code("691839ce5af437ed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float64, ndim 0, 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 numpy as np

# Stand-in class for SpecModel
class MockSpecModel:
    def __init__(self):
        self.params = {'param1': 1.0, 'param2': 2.0}
        self._ln_eline_penalty = 0.0
    
    def prior_product(self, theta, nested=False):
        # Return a finite prior probability
        return -0.5 * np.sum(theta**2)
    
    def set_parameters(self, theta):
        # Update internal parameters based on theta
        self.params = {f'param{i}': val for i, val in enumerate(theta)}
    
    def predict(self, theta, observations, sps=None):
        # Return predictions and auxiliary data
        predictions = []
        for obs in observations:
            # Create a prediction matching the observation shape
            pred = {}
            if 'spectrum' in obs:
                pred['spectrum'] = obs['spectrum'] + np.random.randn(*obs['spectrum'].shape) * 0.1
            if 'maggies' in obs:
                pred['maggies'] = obs['maggies'] + np.random.randn(*obs['maggies'].shape) * 0.1
            predictions.append(pred)
        x = {'extra': 'data'}
        return predictions, x

# Stand-in class for NoiseModel
class MockNoiseModel:
    def __init__(self):
        pass
    
    def update(self, **kwargs):
        # Update noise model with parameters
        pass

# Stand-in class for Observation
class MockObservation(dict):
    def __init__(self, data_dict):
        super().__init__(data_dict)
        self.noise = MockNoiseModel() if data_dict.get('has_noise', False) else None

# Stand-in class for SSPBasis
class MockSSPBasis:
    def __init__(self):
        pass
    
    def get_galaxy_spectrum(self, **kwargs):
        # Return a mock spectrum
        return np.random.randn(100), np.random.randn(100)

# Create mock observations
obs1 = MockObservation({
    'spectrum': np.random.randn(50),
    'unc': np.ones(50) * 0.1,
    'mask': np.ones(50, dtype=bool),
    'ndof': 50,
    'has_noise': True
})

obs2 = MockObservation({
    'maggies': np.random.randn(10),
    'maggies_unc': np.ones(10) * 0.05,
    'phot_mask': np.ones(10, dtype=bool),
    'ndof': 10,
    'has_noise': False
})

# Create theta parameter vector
theta = np.array([0.5, 1.2, -0.3, 0.8])

# Create model instance
model = MockSpecModel()

# Create observations list
observations = [obs1, obs2]

# Create SPS object
sps = MockSSPBasis()

# Define compute_chi and compute_lnlike functions that are used in the function
def compute_chi(pred, obs):
    # Mock chi computation
    if 'spectrum' in obs:
        return (pred['spectrum'] - obs['spectrum']) / obs['unc']
    elif 'maggies' in obs:
        return (pred['maggies'] - obs['maggies']) / obs['maggies_unc']
    return np.array([])

def compute_lnlike(pred, obs, vectors=None):
    # Mock likelihood computation
    if 'spectrum' in obs:
        chi = (pred['spectrum'] - obs['spectrum']) / obs['unc']
        return -0.5 * np.sum(chi**2)
    elif 'maggies' in obs:
        chi = (pred['maggies'] - obs['maggies']) / obs['maggies_unc']
        return -0.5 * np.sum(chi**2)
    return 0.0

# Make these functions available in the global scope for the function to use
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'compute_chi', compute_chi)
setattr(current_module, 'compute_lnlike', compute_lnlike)

ARGS = {
    'theta': theta,
    'model': model,
    'observations': observations,
    'sps': sps,
    'residuals': False,
    'nested': False,
    'negative': False,
    'verbose': False
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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
wrap_lnp Ran
ran; our contract draft was wrong, not the code
bd-j/prospector/prospect/fitting/fitting.py
code served (permissive licence) · get_code("e730ea2dc1ff7dd5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned partial. The image it ran in was not recorded. If your copy returns the same type 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 torch
import torch.nn as nn
from functools import partial as argfix

torch.manual_seed(0)

# Define a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Define a simple log probability function
def sample_lnpfn(observations, model, sps, extra_param=None):
    """A sample log probability function that uses the required parameters"""
    return torch.tensor(0.5)

# Create observations (small tensor)
observations = torch.randn(2, 4)

# Create model instance
model = SimpleModel()

# Create sps (could be samples per second, samples, or some parameter structure)
# Making it a tensor to be generic
sps = torch.tensor([1.0, 2.0])

# Additional kwargs for lnp_kwargs
lnp_kwargs = {
    'extra_param': 'test_value',
    'threshold': 0.1
}

ARGS = {
    'lnpfn': sample_lnpfn,
    'observations': observations,
    'model': model,
    'sps': sps,
    **lnp_kwargs
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
fit_model Not yet run
unverified (harvested, no recorded run)
bd-j/prospector/prospect/fitting/fitting.py
code served (permissive licence) · get_code("c5e301f4210cdfc9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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-21.

Repositories linked to this paper

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

Abstract

Inference of the physical properties of stellar populations from observed photometry and spectroscopy is a key goal in the study of galaxy evolution. In recent years the quality and quantity of the available data has increased, and there have been corresponding efforts to increase the realism of the stellar population models used to interpret these observations. Describing the observed galaxy spectral energy distributions in detail now requires physical models with a large number of highly correlated parameters. These models do not fit easily on grids and necessitate a full exploration of the available parameter space. We present prospector, a flexible code for inferring stellar population parameters from photometry and spectroscopy spanning UV through IR wavelengths. This code is based on forward modeling the data and Monte Carlo sampling the posterior parameter distribution, enabling complex models and exploration of moderate dimensional parameter spaces. We describe the key ingredients of the code and discuss the general philosophy driving the design of these ingredients. We demonstrate some capabilities of the code on several datasets, including mock and real data.

For agents

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

get_harvested_code_for_paper("2012.01426")
get_code_for_paper("2012.01426")
have("2012.01426")

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

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

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

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

Connect an agent — have() is free.