SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.15071 · 2023

Sensitivity Analysis of Simulation-Based Inference for Galaxy Clustering

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 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/2309.15071.json · badge: /api/ran/2309.15071.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
modichirag/contrastive_cosmology canonical (classifier label)
classifier basis: census
14 ran · 3 no recorded run
FunctionStatusWhere it lives
find_block Ran
ran, honoured the contract we drafted
modichirag/contrastive_cosmology/src/readsnap.py
code served (permissive licence) · get_code("97aa4c8dc4c4f62d")
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 1, dtype family int; 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
import tempfile
import os

# Create a temporary binary file with a valid block structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'test_block.bin')

# Write a simple binary file with block structure
with open(temp_file, 'wb') as f:
    # Format 1 style block (simple format)
    # Block 1: size=20, data, size_check
    block_size_1 = np.uint32(20)
    block_data_1 = b'x' * 20
    block_size_check_1 = np.uint32(20)
    
    f.write(block_size_1.tobytes())
    f.write(block_data_1)
    f.write(block_size_check_1.tobytes())
    
    # Block 2: size=16, data, size_check
    block_size_2 = np.uint32(16)
    block_data_2 = b'y' * 16
    block_size_check_2 = np.uint32(16)
    
    f.write(block_size_2.tobytes())
    f.write(block_data_2)
    f.write(block_size_check_2.tobytes())

ARGS = {
    'filename': temp_file,
    'format': 1,
    'swap': False,
    'block': b'',
    'block_num': 1,
    'only_list_blocks': False
}
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 tuple, ndim 1, dtype family int — 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
fname_format Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/readgadget.py
code served (permissive licence) · get_code("f604beae18769cdb")
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 1, 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 tempfile
import os

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

# Create test snapshot files to match the function's file existence checks
test_snapshot_base = os.path.join(temp_dir, "test_snapshot")

# Create a .hdf5 file so the function can find it
hdf5_file = test_snapshot_base + ".hdf5"
with open(hdf5_file, 'w') as f:
    f.write("")

# The function takes a snapshot parameter (string path)
# It checks if the file exists and determines the format
snapshot = test_snapshot_base

ARGS = {
    "snapshot": snapshot
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
paint Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/old_tools.py
code served (permissive licence) · get_code("9bb61e121d58608b")
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 3, dtype family float, shape (5, 5, 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

numpy.random.seed(0)

# Create a small mesh (3D grid)
mesh = numpy.zeros((5, 5, 5), dtype=numpy.float64)

# Create positions - shape (4, 3) for 4 particles in 3D space
# Positions should be normalized to [0, mesh.shape[i])
pos = numpy.array([
    [1.5, 2.3, 1.2],
    [3.2, 1.8, 2.9],
    [0.5, 4.2, 3.1],
    [2.1, 3.5, 0.8]
], dtype=numpy.float64)

# Create weights for each particle
weights = numpy.array([1.0, 1.5, 0.8, 2.0], dtype=numpy.float64)

# Define a simple transform function (identity)
def transform_fn(x):
    return x

# Create period (wrap positions in periodic box)
period = numpy.array([5, 5, 5], dtype=numpy.int32)

ARGS = {
    'pos': pos,
    'mesh': mesh,
    'weights': weights,
    'mode': 'raise',
    'period': period,
    'transform': transform_fn
}
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 3, dtype family float, shape (5, 5, 5) — shape (5, 5, 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
paintcic Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/old_tools.py
code served (permissive licence) · get_code("8ee136bbacd8fa33")
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 3, dtype family float, shape (5, 5, 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 small sample data for paintcic function
# pos: array of particle positions with shape (num_particles, 3)
# bs: box size (float)
# nc: number of cells (int)
# mass: particle mass (float or array)
# period: whether to apply periodic boundary conditions (bool)

pos = np.array([
    [0.5, 1.0, 1.5],
    [2.3, 2.8, 3.1]
], dtype=np.float64)

bs = 10.0
nc = 5
mass = 1.0
period = True

ARGS = {
    'pos': pos,
    'bs': bs,
    'nc': nc,
    'mass': mass,
    'period': period
}
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 3, dtype family float, shape (5, 5, 5) — shape (5, 5, 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
paintnn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
modichirag/contrastive_cosmology/src/old_tools.py
code served (permissive licence) · get_code("38f26f397f49ec66")
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 3, dtype family float, shape (5, 5, 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

# Analyze the function:
# - pos: used with pos.shape[0] and passed to np.histogramdd, so needs to be ndarray with shape (n, 3) for 3D
# - bs: used as scalar in bins calculation and histogramdd, so int/float
# - nc: used as scalar in bins calculation, so int/float
# - mass: optional, converted to np.ones(pos.shape[0]) if not ndarray, used as weights in histogramdd
# - period: boolean, not used in function body
# - shift: boolean, controls which branch is taken

# Create small valid arguments
np.random.seed(0)

# pos: array of shape (4, 3) for 4 particles in 3D space
pos = np.random.rand(4, 3) * 10.0

# bs: bin size (scalar)
bs = 10.0

# nc: number of cells (scalar)
nc = 5

# mass: weights for particles (optional, can be ndarray or scalar)
mass = np.array([1.0, 1.5, 1.0, 2.0])

# period: boolean flag
period = True

# shift: boolean flag
shift = True

ARGS = {
    'pos': pos,
    'bs': bs,
    'nc': nc,
    'mass': mass,
    'period': period,
    'shift': shift
}
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 3, dtype family float, shape (5, 5, 5) — shape (5, 5, 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
plot_coverage Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
modichirag/contrastive_cosmology/src/sbiplots.py
code served (permissive licence) · get_code("7b5b7704ab909fcb")
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. 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 numpy as np
import matplotlib.pyplot as plt

# Create a small ranks array with shape (ncounts, npars)
# The function uses ranks[:, i] to extract each parameter's ranks
# and expects a 2D array where first dimension is counts, second is parameters
np.random.seed(0)
ranks = np.random.rand(8, 5) * 100  # 8 data points, 5 parameters

# Create titles for each parameter
titles = ['Param 1', 'Param 2', 'Param 3', 'Param 4', 'Param 5']

# Create a temporary file path (won't actually save due to sandbox restrictions)
savepath = None

# Create a figure or leave as None to let the function create one
figure = None

# Additional optional parameters
suffix = '_test'
label = 'test_label'
plotscatter = True

ARGS = {
    'ranks': ranks,
    'npars': 5,
    'titles': titles,
    'savepath': savepath,
    'figure': figure,
    'suffix': suffix,
    'label': label,
    'plotscatter': plotscatter
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
plot_ranks_histogram Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
modichirag/contrastive_cosmology/src/sbiplots.py
code served (permissive licence) · get_code("7e69e8e0a164a50c")
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. 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 numpy as np
import matplotlib.pyplot as plt

# Create sample ranks data
# The function expects ranks to be a 2D array with shape (n_samples, npars)
# where npars=5 in the default case
np.random.seed(0)
ranks = np.random.randint(0, 100, size=(50, 5)).astype(float)

# Create titles for each parameter
titles = ['Param 1', 'Param 2', 'Param 3', 'Param 4', 'Param 5']

# Create a temporary directory-like path for savepath
savepath = None  # Set to None to avoid file I/O

# Pre-create figure and axes if needed
figure = None

# Suffix for saved files
suffix = '_test'

ARGS = {
    'ranks': ranks,
    'nbins': 10,
    'npars': 5,
    'titles': titles,
    'savepath': savepath,
    'figure': figure,
    'suffix': suffix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
read_block Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
modichirag/contrastive_cosmology/src/readgadget.py
code served (permissive licence) · get_code("f9212462d8d26bec")
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 (10, 3) 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 tempfile
import os
import h5py
import numpy as np

# Create a temporary HDF5 file to serve as a snapshot
temp_dir = tempfile.mkdtemp()
snapshot_path = os.path.join(temp_dir, "snapshot")

# Create a valid HDF5 snapshot file
with h5py.File(snapshot_path + ".hdf5", "w") as f:
    header_group = f.create_group("Header")
    
    # Set required header attributes
    header_group.attrs[u'Time'] = np.float32(1.0)
    header_group.attrs[u'Redshift'] = np.float32(0.0)
    header_group.attrs[u'BoxSize'] = np.float32(100.0)
    header_group.attrs[u'NumFilesPerSnapshot'] = np.int32(1)
    header_group.attrs[u'Omega0'] = np.float32(0.3)
    header_group.attrs[u'OmegaLambda'] = np.float32(0.7)
    header_group.attrs[u'HubbleParam'] = np.float32(0.7)
    header_group.attrs[u'MassTable'] = np.zeros(6, dtype=np.float32)
    header_group.attrs[u'NumPart_ThisFile'] = np.array([10, 0, 0, 0, 0, 0], dtype=np.uint32)
    header_group.attrs[u'NumPart_Total'] = np.array([10, 0, 0, 0, 0, 0], dtype=np.uint64)
    header_group.attrs[u'Flag_Cooling'] = np.int32(0)
    
    # Create PartType0 with required datasets
    ptype0 = f.create_group("PartType0")
    ptype0.create_dataset("Coordinates", data=np.random.rand(10, 3).astype(np.float32))
    ptype0.create_dataset("Velocities", data=np.random.rand(10, 3).astype(np.float32))
    ptype0.create_dataset("Masses", data=np.ones(10, dtype=np.float32))
    ptype0.create_dataset("ParticleIDs", data=np.arange(10, dtype=np.uint32))

ARGS = {
    "snapshot": snapshot_path,
    "block": "POS ",
    "ptype": [0],
    "verbose": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, 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 (10, 3) — shape (10, 3) 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
read_field Ran
ran, honoured the contract we drafted
modichirag/contrastive_cosmology/src/readgadget.py
code served (permissive licence) · get_code("7a560d7241ea1322")
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 (100, 3) 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 tempfile
import os
import h5py
import numpy as np

# Create a temporary HDF5 file with proper structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'snapshot.hdf5')

with h5py.File(temp_file, 'w') as f:
    # Create Header group with required attributes
    header_group = f.create_group('Header')
    header_group.attrs[u'Time'] = 1.0
    header_group.attrs[u'Redshift'] = 0.0
    header_group.attrs[u'BoxSize'] = 100.0
    header_group.attrs[u'NumFilesPerSnapshot'] = 1
    header_group.attrs[u'Omega0'] = 0.3
    header_group.attrs[u'OmegaLambda'] = 0.7
    header_group.attrs[u'HubbleParam'] = 0.7
    header_group.attrs[u'MassTable'] = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
    header_group.attrs[u'NumPart_ThisFile'] = np.array([0, 100, 0, 0, 0, 0])
    header_group.attrs[u'NumPart_Total'] = np.array([0, 100, 0, 0, 0, 0])
    header_group.attrs[u'Flag_Cooling'] = 0
    
    # Create PartType1 group with test data
    ptype1 = f.create_group('PartType1')
    ptype1.create_dataset('Coordinates', data=np.random.rand(100, 3).astype(np.float32))
    ptype1.create_dataset('Masses', data=np.random.rand(100).astype(np.float32))
    ptype1.create_dataset('ParticleIDs', data=np.arange(100, dtype=np.uint32))
    ptype1.create_dataset('Velocities', data=np.random.rand(100, 3).astype(np.float32))

ARGS = {
    'snapshot': temp_file,
    'block': 'POS ',
    'ptype': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, 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 (100, 3) — shape (100, 3) 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
read_gadget_header Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/readsnap.py
code served (permissive licence) · get_code("0a1cebf1e510734a")
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 dict. 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 numpy as np
import os
import tempfile
import struct

# Create a minimal valid Gadget snapshot file for testing
temp_dir = tempfile.mkdtemp()
test_filename = os.path.join(temp_dir, "test_snapshot")

# Write a minimal Gadget format 1 file with blocksize 256
with open(test_filename, 'wb') as f:
    # Write blocksize (256 bytes for format 1)
    blocksize = np.int32(256)
    f.write(blocksize.tobytes())
    
    # Write header data (must be 256 bytes)
    # npart (6 int32s = 24 bytes)
    npart = np.array([100, 200, 50, 0, 0, 0], dtype=np.int32)
    f.write(npart.tobytes())
    
    # massarr (6 float64s = 48 bytes)
    massarr = np.array([0.0, 1.0, 2.0, 0.0, 0.0, 0.0], dtype=np.float64)
    f.write(massarr.tobytes())
    
    # time (1 float64 = 8 bytes)
    time_val = np.float64(1.0)
    f.write(time_val.tobytes())
    
    # redshift (1 float64 = 8 bytes)
    redshift = np.float64(0.0)
    f.write(redshift.tobytes())
    
    # sfr (1 int32 = 4 bytes)
    sfr = np.int32(0)
    f.write(sfr.tobytes())
    
    # feedback (1 int32 = 4 bytes)
    feedback = np.int32(0)
    f.write(feedback.tobytes())
    
    # nall (6 uint32s = 24 bytes)
    nall = np.array([100, 200, 50, 0, 0, 0], dtype=np.uint32)
    f.write(nall.tobytes())
    
    # cooling (1 int32 = 4 bytes)
    cooling = np.int32(0)
    f.write(cooling.tobytes())
    
    # filenum (1 int32 = 4 bytes)
    filenum = np.int32(1)
    f.write(filenum.tobytes())
    
    # boxsize (1 float64 = 8 bytes)
    boxsize = np.float64(1000.0)
    f.write(boxsize.tobytes())
    
    # omega_m (1 float64 = 8 bytes)
    omega_m = np.float64(0.3)
    f.write(omega_m.tobytes())
    
    # omega_l (1 float64 = 8 bytes)
    omega_l = np.float64(0.7)
    f.write(omega_l.tobytes())
    
    # hubble (1 float64 = 8 bytes)
    hubble = np.float64(0.7)
    f.write(hubble.tobytes())
    
    # Fill remaining bytes to reach 256 total
    current_size = 24 + 48 + 8 + 8 + 4 + 4 + 24 + 4 + 4 + 8 + 8 + 8 + 8
    padding_size = 256 - current_size
    f.write(b'\x00' * padding_size)
    
    # Write closing blocksize
    f.write(blocksize.tobytes())

ARGS = {
    "filename": test_filename
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sample_HOD Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/hodtools.py
code served (permissive licence) · get_code("761603158e48e81d")
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 dict. 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 numpy as np

ARGS = {
    'm_hod': 'zheng07',
    'seed': 42
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sample_conditional_HOD Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/hodtools.py
code served (permissive licence) · get_code("3142c0f2374e97fa")
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 dict. 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 numpy as np

ARGS = {
    'm_hod': 'zheng07',
    'mcut': 12.5,
    'm1': None,
    'seed': 0,
    'ab_scatter': 0.2,
    'clip': 1.0,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
setup_hod Ran
ran, honoured the contract we drafted
modichirag/contrastive_cosmology/src/hodtools.py
code served (permissive licence) · get_code("a9cce10aa3235af4")
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 1, 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

class MockHalosData:
    def __init__(self):
        self.data = {
            'Mass': self
        }
    
    def __getitem__(self, key):
        if key == 'Mass':
            return self
        return self.data[key]
    
    def compute(self):
        # Generate a sorted array of halo masses
        # Need enough halos to satisfy the function's indexing
        np.random.seed(42)
        masses = np.sort(np.random.uniform(1e12, 1e15, size=8000))
        return masses

halos = {
    'Mass': MockHalosData()
}

ARGS = {
    'halos': halos,
    'nbar': 0.0001,
    'satfrac': 0.2,
    'bs': 1000,
    'alpha_fid': 0.7
}
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 tuple, ndim 1, 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
thetahod_literature Ran
ran; our contract draft was wrong, not the code
modichirag/contrastive_cosmology/src/galaxies.py
code served (permissive licence) · get_code("da849c0286f74371")
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 dict. 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 numpy as np

# Analyze the function: thetahod_literature takes a single parameter 'paper'
# which should be a string matching one of the supported paper names.
# The function returns a dictionary of HOD parameters.

# Valid paper options from the docstring:
# - 'parejko2013_lowz'
# - 'manera2015_lowz_ngc'
# - 'manera2015_lowz_sgc'
# - 'reid2014_cmass' (note: function has 'reid2014_cmass' not 'redi2014_cmass')

# Choose one valid paper name for the setup
ARGS = {
    'paper': 'parejko2013_lowz'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
read_block Not yet run
unverified (harvested, no recorded run)
modichirag/contrastive_cosmology/src/readsnap.py
code served (permissive licence) · get_code("cd6253c8ab04a31e")
How it ran

no invocation recorded.

split_index Not yet run
unverified (harvested, no recorded run)
modichirag/contrastive_cosmology/src/sbitools.py
code served (permissive licence) · get_code("784aced1e2f67a73")
How it ran

no invocation recorded.

test_train_split Not yet run
unverified (harvested, no recorded run)
modichirag/contrastive_cosmology/src/sbitools.py
code served (permissive licence) · get_code("f7dde67927bd853f")
How it ran

no invocation recorded.

Also present in other papers' code

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

Simulation-based inference (SBI) is a promising approach to leverage high fidelity cosmological simulations and extract information from the non-Gaussian, non-linear scales that cannot be modeled analytically. However, scaling SBI to the next generation of cosmological surveys faces the computational challenge of requiring a large number of accurate simulations over a wide range of cosmologies, while simultaneously encompassing large cosmological volumes at high resolution. This challenge can potentially be mitigated by balancing the accuracy and computational cost for different components of the the forward model while ensuring robust inference. To guide our steps in this, we perform a sensitivity analysis of SBI for galaxy clustering on various components of the cosmological simulations: gravity model, halo-finder and the galaxy-halo distribution models (halo-occupation distribution, HOD). We infer the $σ_8$ and $Ω_m$ using galaxy power spectrum multipoles and the bispectrum monopole assuming a galaxy number density expected from the luminous red galaxies observed using the Dark Energy Spectroscopy Instrument (DESI). We find that SBI is insensitive to changing gravity model between $N$-body simulations and particle mesh (PM) simulations. However, changing the halo-finder from friends-of-friends (FoF) to Rockstar can lead to biased estimate of $σ_8$ based on the bispectrum. For galaxy models, training SBI on more complex HOD leads to consistent inference for less complex HOD models, but SBI trained on simpler HOD models fails when applied to analyze data from a more complex HOD model. Based on our results, we discuss the outlook on cosmological simulations with a focus on applying SBI approaches to future galaxy surveys.

For agents

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

get_harvested_code_for_paper("2309.15071")
get_code_for_paper("2309.15071")
have("2309.15071")

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

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

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

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

Connect an agent — have() is free.