SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.00864 · 2021

Constrained non-negative matrix factorization enabling real-time insights of $\textit{in situ}$ and high-throughput experiments

arXiv · PDF · Open in the Atlas

Code that ran

17 of 21 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, 4 violated it and 10 have no contract verdict; 3 failures of our instrument; 4 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/2104.00864.json · badge: /api/ran/2104.00864.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
bnl/pub-Maffettone_2021_04 canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
NSLS-II/constrained-matrix-factorization community (classifier label)
classifier basis not recorded on the link
12 ran · 4 no recorded run
FunctionStatusWhere it lives
Euclidean Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/metrics.py
code served (permissive licence) · get_code("b4d4a9741a95cdcc")
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 Tensor, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for predict and target
# Batch size 2, dimension 4
predict = torch.randn(2, 4)
target = torch.randn(2, 4)

ARGS = {
    'predict': predict,
    'target': target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
IS_divergence Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/metrics.py
code served (permissive licence) · get_code("dcb5e69a1cca5494")
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 Tensor, 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 torch
from operator import mul
from functools import reduce

torch.manual_seed(0)

# The function IS_divergence performs element-wise operations on two tensors:
# - Division: target / predict
# - Summation and logarithm on the result
# - Uses target.shape to get dimensions
# Both predict and target must be tensors with compatible shapes

predict = torch.randn(2, 4)
target = torch.randn(2, 4)

# Ensure target is positive (required for division and log operations)
target = torch.abs(target) + 0.1
predict = torch.abs(predict) + 0.1

ARGS = {
    "predict": predict,
    "target": target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
KL_divergence Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/metrics.py
code served (permissive licence) · get_code("103628a541cf7a84")
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 Tensor, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function KL_divergence takes two tensor arguments: predict and target
# It performs element-wise operations: division, log, multiplication, sum
# Both tensors need to support these operations and have compatible shapes

# Create small probability-like tensors for KL divergence computation
# Using shape (2, 4) for batch_size=2, dim=4
predict = torch.tensor([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

target = torch.tensor([
    [0.15, 0.25, 0.35, 0.25],
    [0.2, 0.3, 0.3, 0.2]
], dtype=torch.float32)

# Ensure both are valid probability distributions (non-negative, avoid log(0))
predict = torch.clamp(predict, min=1e-8)
target = torch.clamp(target, min=1e-8)

ARGS = {
    "predict": predict,
    "target": target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
construct_overlap Ran
ran; our contract draft was wrong, not the code
bnl/pub-Maffettone_2021_04/constrainednmf/example_scripts/simulation_constraining_weights.py
code served (permissive licence) · get_code("e30b629762e9c5ce")
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) 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

ARGS = {
    "n_features": 1000,
    "m_patterns": 100,
    "mu": 1.2,
    "sig": 1
}
Setup block drafted by
a language model, Claude Haiku 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 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
construct_overlap Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/example_scripts/fixing_weights.py
code served (permissive licence) · get_code("6b745b4e35321043")
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

ARGS = {
    "n_features": 1000,
    "m_patterns": 21,
    "mu": 1.2,
    "sig": 1
}
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 — 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
decomp_plot Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/utils/plotting.py
code served (permissive licence) · get_code("efc799ee1501e75a")
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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleNMF(nn.Module):
    def __init__(self, n_components, n_features, n_samples):
        super().__init__()
        self.H = nn.Parameter(torch.randn(n_components, n_features))
        self.W = nn.Parameter(torch.randn(n_samples, n_components))
    
    def forward(self, x):
        return torch.matmul(self.W, self.H)

nmf = SimpleNMF(n_components=3, n_features=4, n_samples=5)
T = np.linspace(0, 1, 5)

ARGS = {
    "nmf": nmf,
    "T": T,
    "axes": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — 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
gaussian Ran
ran, violated the contract we drafted
bnl/pub-Maffettone_2021_04/constrainednmf/example_scripts/simulation_constraining_weights.py
code served (permissive licence) · get_code("bfb5a3349111c442")
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) 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 gaussian function takes three parameters: x, mu, and sig
# It performs element-wise operations on numpy arrays
# x: input array
# mu: mean (scalar or array)
# sig: standard deviation (scalar or array)

x = np.array([0.0, 1.0, 2.0, 3.0])
mu = 1.5
sig = 0.8

ARGS = {
    "x": x,
    "mu": mu,
    "sig": sig
}
Setup block drafted by
a language model, Claude Haiku 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
gaussian Ran
ran, violated the contract we drafted
bnl/pub-Maffettone_2021_04/constrainednmf/example_scripts/simulation_constraining_components.py
code served (permissive licence) · get_code("dc85e687f1fe54a1")
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) 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

# Construct arguments for the gaussian function
# The function computes: a * exp(-(x - mu)^2 / (2 * sig^2))
# All parameters should be numeric (scalars or arrays)

x = np.array([0.0, 1.0, 2.0, 3.0])  # input values
mu = 1.5  # mean
sig = 0.8  # standard deviation
a = 2.0  # amplitude

ARGS = {
    "x": x,
    "mu": mu,
    "sig": sig,
    "a": a
}
Setup block drafted by
a language model, Claude Haiku 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
get_data Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/example_scripts/bto.py
code served (permissive licence) · get_code("72940734b1f5958e")
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 torch
import numpy as np
from pathlib import Path
import tempfile
import os

# Create a temporary directory with mock .npy files
temp_dir = tempfile.mkdtemp()

# Create mock .npy files with temperature in filename
# Format: something_XXX_something.npy where XXX is temperature
profiles_data = [
    np.random.rand(1, 4).astype(np.float32),  # 1x4 profile
    np.random.rand(1, 4).astype(np.float32),  # 1x4 profile
]

for i, temp in enumerate([250, 300]):
    filename = f"data_{temp:03d}_xrd.npy"
    filepath = os.path.join(temp_dir, filename)
    np.save(filepath, profiles_data[i])

data_dir = Path(temp_dir)

ARGS = {
    'data_dir': data_dir
}
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 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
get_data Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/example_scripts/molten_salt.py
code served (permissive licence) · get_code("d93ac8414c5d548c")
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 torch
import numpy as np
from pathlib import Path
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory with sample .chi files
temp_dir = tempfile.mkdtemp()

# Create sample .chi files with temperature values in filename
# Format: name_[T]_suffix.chi where T is temperature
for i, temp in enumerate([300.0, 350.0, 400.0]):
    filename = f"sample_{i}_[{temp}]_data.chi"
    filepath = os.path.join(temp_dir, filename)
    
    # Generate sample data with x values from 0 to 10 and y values
    x_data = np.linspace(0, 10, 100)
    y_data = np.sin(x_data) + np.random.randn(100) * 0.1
    
    with open(filepath, 'w') as f:
        for x, y in zip(x_data, y_data):
            f.write(f"{x:.6f} {y:.6f}\n")

data_dir = Path(temp_dir)

ARGS = {
    'data_dir': data_dir
}
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 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
lorentzian Ran
ran, violated the contract we drafted
bnl/pub-Maffettone_2021_04/constrainednmf/example_scripts/simulation_constraining_components.py
code served (permissive licence) · get_code("4059f8d130c75434")
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) and returned Tensor, 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 torch
import numpy as np

torch.manual_seed(0)

# The lorentzian function takes scalar or array-like parameters
# x: input values (can be tensor or array)
# x0: center position (scalar)
# gam: gamma/width parameter (scalar)
# a: amplitude parameter (scalar)

x = torch.tensor([1.0, 2.0, 3.0, 4.0])
x0 = 2.5
gam = 0.5
a = 1.0

ARGS = {
    "x": x,
    "x0": x0,
    "gam": gam,
    "a": a
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
normalize Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/utils.py
code served (permissive licence) · get_code("4513b2bb026b89d2")
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 Tensor, 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 torch

torch.manual_seed(0)

# Create a small tensor for testing
# Using shape (2, 4) - batch of 2, dimension 4
x = torch.randn(2, 4)

ARGS = {
    "x": x,
    "axis": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
register_vcs_handler Ran
ran; our contract draft was wrong, not the code
NSLS-II/constrained-matrix-factorization/versioneer.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from Hhuangsj/GREX, is pointer only (licence: NONE) · get_code("f12f4dabbeb242eb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from Hhuangsj/GREX, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

run_command Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/versioneer.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from Hhuangsj/GREX, is pointer only (licence: NONE) · get_code("86d4ff45d6295e29")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from Hhuangsj/GREX, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

scalar_to_vec Ran
ran on a synthesized input
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/utils.py
code served (permissive licence) · get_code("c2191e9366151532")
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 (7,) 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 scipy.stats as st

ARGS = {
    'x': 2.5,
    'k': 7,
    'dist': 'gauss',
    'nsig': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (7,) — shape (7,) 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
tophat Ran
ran, violated the contract we drafted
bnl/pub-Maffettone_2021_04/constrainednmf/example_scripts/simulation_constraining_components.py
code served (permissive licence) · get_code("ac3311fb78cb42ee")
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) and returned ndarray, ndim 1, dtype family float, shape (100,) 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 tophat takes:
# x: array-like input
# s1: scalar threshold 1
# s2: scalar threshold 2
# a: scalar amplitude

ARGS = {
    "x": np.linspace(-5, 5, 100),
    "s1": 0.0,
    "s2": 2.0,
    "a": 1.5
}
Setup block drafted by
a language model, Claude Haiku 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 (100,) — shape (100,) 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
versions_from_parentdir Ran
ran; our contract draft was wrong, not the code
NSLS-II/constrained-matrix-factorization/constrainedmf/_version.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from Hhuangsj/GREX, is pointer only (licence: NONE) · get_code("b9a1535d27f2a9fb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from Hhuangsj/GREX, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_config_from_root Not yet run
unverified (harvested, no recorded run)
NSLS-II/constrained-matrix-factorization/versioneer.py
code served (permissive licence) · get_code("7a63797a121e8bbf")
How it ran

no invocation recorded.

sweep_components Not yet run
unverified (harvested, no recorded run)
NSLS-II/constrained-matrix-factorization/constrainedmf/nmf/utils.py
code served (permissive licence) · get_code("d28ebfacd8fd4cd1")
How it ran

no invocation recorded.

toy_plot Not yet run
unverified (harvested, no recorded run)
NSLS-II/constrained-matrix-factorization/constrainedmf/utils/plotting.py
code served (permissive licence) · get_code("38c0f458a2b3424c")
How it ran

no invocation recorded.

waterfall Not yet run
unverified (harvested, no recorded run)
NSLS-II/constrained-matrix-factorization/constrainedmf/utils/plotting.py
code served (permissive licence) · get_code("37b5fda319bf3c0a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 18 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.

FunctionAlso present inEarliest-datedOthers named
register_vcs_handler 26 other papers
11 dated earlier, 1 the same month, 14 later
1806.00550 (2018-06)
A Swiss Army Infinitesimal Jackknife
1806.03146 (2018-06)
Neural Message Passing with Edge Updates for Predicting Properties of Molecules and Materials
1806.03720 (2018-06)
Stochastic seismic waveform inversion using generative adversarial networks as a geological prior
and 23 more not named here
versions_from_parentdir 16 other papers
10 dated earlier, 6 later
1806.00550 (2018-06)
A Swiss Army Infinitesimal Jackknife
1806.03720 (2018-06)
Stochastic seismic waveform inversion using generative adversarial networks as a geological prior
1812.01719 (2018-12)
Knowing what you know in brain segmentation using Bayesian deep neural networks
and 13 more not named here
run_command 14 other papers
8 dated earlier, 6 later
1806.00550 (2018-06)
A Swiss Army Infinitesimal Jackknife
1806.03720 (2018-06)
Stochastic seismic waveform inversion using generative adversarial networks as a geological prior
1812.01719 (2018-12)
Knowing what you know in brain segmentation using Bayesian deep neural networks
and 11 more not named here

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

Non-negative Matrix Factorization (NMF) methods offer an appealing unsupervised learning method for real-time analysis of streaming spectral data in time-sensitive data collection, such as $\textit{in situ}$ characterization of materials. However, canonical NMF methods are optimized to reconstruct a full dataset as closely as possible, with no underlying requirement that the reconstruction produces components or weights representative of the true physical processes. In this work, we demonstrate how constraining NMF weights or components, provided as known or assumed priors, can provide significant improvement in revealing true underlying phenomena. We present a PyTorch based method for efficiently applying constrained NMF and demonstrate this on several synthetic examples. When applied to streaming experimentally measured spectral data, an expert researcher-in-the-loop can provide and dynamically adjust the constraints. This set of interactive priors to the NMF model can, for example, contain known or identified independent components, as well as functional expectations about the mixing of components. We demonstrate this application on measured X-ray diffraction and pair distribution function data from $\textit{in situ}$ beamline experiments. Details of the method are described, and general guidance provided to employ constrained NMF in extraction of critical information and insights during $\textit{in situ}$ and high-throughput experiments.

For agents

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

get_harvested_code_for_paper("2104.00864")
get_code_for_paper("2104.00864")
have("2104.00864")

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

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

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

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

Connect an agent — have() is free.