13 Commits
0.0.4 ... 1.0.1

Author SHA1 Message Date
Jakob Lass
c70d7759d0 Update of tutorial
All checks were successful
Gitea Actions Demo / build_test (3.10.17) (push) Successful in 18s
Gitea Actions Demo / build_test (3.11.12) (push) Successful in 18s
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 16s
Gitea Actions Demo / build_test (3.13.3) (push) Successful in 17s
Gitea Actions Demo / build_test (3.9.22) (push) Successful in 14s
Release workflow / single_test (3.13.3) (release) Successful in 13s
Release workflow / Build wheels for PyPI (3.13.3) (release) Successful in 11s
2025-08-21 13:23:53 +02:00
Jakob Lass
21fa774c95 Bump version 2025-08-21 11:43:49 +02:00
Jakob Lass
4f6e75915a Correct initialization of convergence loop 2025-08-21 11:41:15 +02:00
Jakob Lass
25f47e5e23 Bump to 1.0.0
Some checks failed
Gitea Actions Demo / build_test (3.11.12) (push) Successful in 14s
Gitea Actions Demo / build_test (3.9.22) (push) Failing after 10s
Gitea Actions Demo / build_test (3.13.3) (push) Successful in 14s
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 16s
Gitea Actions Demo / build_test (3.10.17) (push) Failing after 1m8s
Release workflow / single_test (3.13.3) (release) Successful in 12s
Release workflow / Build wheels for PyPI (3.13.3) (release) Successful in 14s
2025-07-14 13:55:19 +02:00
Jakob Lass
c611a818b6 Bump version
Some checks failed
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 18s
Gitea Actions Demo / build_test (3.13.3) (push) Successful in 18s
Gitea Actions Demo / build_test (3.10.17) (push) Failing after 41s
Gitea Actions Demo / build_test (3.9.22) (push) Failing after 31s
Gitea Actions Demo / build_test (3.11.12) (push) Successful in 41s
Release workflow / single_test (3.13.3) (release) Successful in 13s
Release workflow / Build wheels for PyPI (3.13.3) (release) Successful in 15s
2025-07-14 13:07:24 +02:00
Jakob Lass
e4c6c1ea29 Correct convergence test 2025-07-14 13:07:04 +02:00
7b34181d75 Merge pull request 'Update .gitea/workflows/test.yaml' (#1) from bruhn_b-patch-1 into main
All checks were successful
Gitea Actions Demo / build_test (3.11.12) (push) Successful in 2m12s
Gitea Actions Demo / build_test (3.13.3) (push) Successful in 2m12s
Gitea Actions Demo / build_test (3.10.17) (push) Successful in 2m26s
Gitea Actions Demo / build_test (3.9.22) (push) Successful in 2m18s
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 2m30s
Reviewed-on: #1
2025-07-04 09:19:08 +02:00
71d849d861 Update .gitea/workflows/test.yaml
Some checks failed
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 13s
Gitea Actions Demo / build_test (3.11.12) (push) Failing after 37s
Gitea Actions Demo / build_test (3.10.17) (push) Failing after 39s
Gitea Actions Demo / build_test (3.13.3) (push) Successful in 40s
Gitea Actions Demo / build_test (3.9.22) (push) Failing after 1m12s
2025-06-05 11:34:17 +02:00
d60c8c2aaa Change bec_lib install to bec
Some checks failed
Gitea Actions Demo / build_test (3.11.12) (push) Failing after 6s
Gitea Actions Demo / build_test (3.10.17) (push) Failing after 13s
Gitea Actions Demo / build_test (3.13.3) (push) Failing after 4s
Gitea Actions Demo / build_test (3.12.10) (push) Failing after 14s
Gitea Actions Demo / build_test (3.9.22) (push) Failing after 13s
2025-06-03 11:08:04 +02:00
4290704a96 Add random bec_lib module
Some checks failed
Gitea Actions Demo / build_test (3.11.12) (push) Failing after 11s
Gitea Actions Demo / build_test (3.13.3) (push) Failing after 9s
Gitea Actions Demo / build_test (3.10.17) (push) Successful in 31s
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 28s
Gitea Actions Demo / build_test (3.9.22) (push) Successful in 23s
Due to some error when testing on the nodes on gitea, the bec_lib package is imported. Now it has been added in the installation as a hack
2025-06-03 11:04:46 +02:00
Jakob Lass
9fb35dfda4 Update convergence criterion for denoise
Some checks failed
Gitea Actions Demo / build_test (3.11.12) (push) Failing after 8s
Gitea Actions Demo / build_test (3.10.17) (push) Successful in 11s
Gitea Actions Demo / build_test (3.13.3) (push) Failing after 9s
Gitea Actions Demo / build_test (3.12.10) (push) Successful in 11s
Gitea Actions Demo / build_test (3.9.22) (push) Successful in 10s
2025-05-28 10:29:12 +02:00
Jakob Lass
00ad81aba6 Change numpy requirement 2025-05-28 10:28:15 +02:00
Jakob Lass
aef221fb04 Remove left over test 2025-04-17 13:34:45 +02:00
5 changed files with 59 additions and 60 deletions

View File

@@ -20,6 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install bec-lib
python -m pip install .
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
@@ -32,11 +33,3 @@ jobs:
- name: Test with pytest
run: |
python -m pytest -vv tests
release-test:
needs: [build_test]
runs-on: ubuntu-latest
steps:
- name: Checking that the above worked
run: |
echo "🎉 The job was automatically triggered by the success of build_test."

View File

@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools >= 77.0.3"]
requires = ["setuptools"]# >= 77.0.3"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
@@ -8,9 +8,9 @@ package-dir = {"" = "src"}
[project]
name = "AMBER-ds4ms"
version = "0.0.4"
version = "1.0.1"
dependencies = [
"numpy>=2",
"numpy>=1.14",
"scipy>=1.7",
"torch>=2",
"matplotlib>=3.4",
@@ -27,7 +27,7 @@ maintainers = [
]
description = "AMBER: Algorithm for Multiplexing spectrometer Background Estimation with Rotation-independence"
readme = "README.md"
license-files = ["LICENSE"]
#license-files = ["LICENSE"]
keywords = ["Machine Learning", "Signal Segmentation", "Background Determination"]
classifiers = [
"Development Status :: 4 - Beta",

View File

@@ -9,14 +9,15 @@
project = 'AMBER'
copyright = '2025, J. Lass, V. Cohen, B. B. Haro, & D. G. Mazzone'
author = 'J. Lass, V. Cohen, B. B. Haro, & D. G. Mazzone'
release = '0.0.4'
release = '1.0.1'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'nbsphinx', # allows notebooks
'myst_parser' # allows markdown
'myst_parser', # allows markdown
'IPython.sphinxext.ipython_console_highlighting',
]
source_suffix = {
'.rst': 'restructuredtext',
@@ -24,7 +25,7 @@ source_suffix = {
'.md': 'markdown',
}
templates_path = ['_templates']
exclude_patterns = []
exclude_patterns = ['**.ipynb_checkpoints']

File diff suppressed because one or more lines are too long

View File

@@ -612,11 +612,11 @@ class background():
Me = self.set_e_design_matrix(mu_)
# Loss function
loss = np.zeros(n_epochs, dtype=self.dtype)
loss[1] = 1.0
k = 1
while (np.abs(loss[k] - loss[k-1]) > 1e-3) and (k < n_epochs-1):
loss = []#np.zeros(n_epochs, dtype=self.dtype)
old_loss = 0
new_loss = 0
k = 0
while ((old_loss - new_loss > 1e-3) and (k < n_epochs)) or k < 2:
# Compute A = Y - B by filling the nans with 0s
A = np.where(np.isnan(Y_r - b_tmp) == True, 0.0, Y_r - b_tmp)
@@ -640,17 +640,18 @@ class background():
b_tmp = self.R_operator(self.b)
# ######################### Compute loss function ##################
loss[k] = 0.5 * np.nansum((Y_r - self.X - b_tmp) ** 2) + lambda_ * np.nansum(np.abs(self.X))
loss.append(0.5 * np.nansum((Y_r - self.X - b_tmp) ** 2) + lambda_ * np.nansum(np.abs(self.X)))
for e in range(self.E_size):
loss[k] += (beta_/2) * np.matmul(self.b[e, :], np.matmul(Lb_lst[e], self.b[e, :].T))
loss[-1] += (beta_/2) * np.matmul(self.b[e, :], np.matmul(Lb_lst[e], self.b[e, :].T))
loss[k] += (mu_ / 2) * np.trace(np.matmul(self.X.T, np.matmul(Le, self.X)))
loss[-1] += (mu_ / 2) * np.trace(np.matmul(self.X.T, np.matmul(Le, self.X)))
if verbose:
print(" Iteration ", str(k))
print(" Loss function: ", loss[k].item())
print(" Iteration ", str(k+1))
print(" Loss function: ", loss[-1].item())
old_loss = new_loss
new_loss = loss[-1]
k += 1
# Compute the propagated background