Skip to content

[feature] Allow for center/scale only in apt.pp.scale_and_center - #274

Merged
lucas-diedrich merged 9 commits into
mainfrom
feature/median-scale-center
Sep 2, 2026
Merged

lucas-diedrich merged 9 commits into
mainfrom
feature/median-scale-center

Conversation

@lucas-diedrich

@lucas-diedrich lucas-diedrich commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Extend functionality of scaling preprocessing step, as used in the multimodal notebook. Especially in TMT experiments, users often want to median-center (but not scale). This is now one special case of the function

This PR

  1. Updates the function and allows users to optionally center-only or scale-only.
apt.pp.scale_and_center(..., center=True/False, scale=True/False)
  1. Adds tests
  2. Use instead of custom median-centering logic in multimodal notebook (validated that the arrays are exactly numerically equivalent)

@lucas-diedrich lucas-diedrich self-assigned this Sep 1, 2026
@lucas-diedrich lucas-diedrich added the enhancement New feature or request label Sep 1, 2026

@vbrennsteiner vbrennsteiner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, LGTM!

Comment thread src/alphapepttools/pp/data.py Outdated
Comment thread src/alphapepttools/pp/data.py Outdated
@lucas-diedrich
lucas-diedrich merged commit 2d34127 into main Sep 2, 2026
14 checks passed
@lucas-diedrich
lucas-diedrich deleted the feature/median-scale-center branch September 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants