Skip to content

Redshift bins in metal matrix and config builder#143

Open
HiramHerrera wants to merge 3 commits intomasterfrom
metal_matrix_zbins
Open

Redshift bins in metal matrix and config builder#143
HiramHerrera wants to merge 3 commits intomasterfrom
metal_matrix_zbins

Conversation

@HiramHerrera
Copy link
Collaborator

This PR introduces functionality to account for the redshift range in the metal matrices.
It also adds support for the corresponding configuration flags in the config builder.

Notes
These commits were made prior to the recent updates (after October 25). However, since no merge conflicts are currently detected, they should integrate smoothly.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 23.07692% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.40%. Comparing base (15c8b65) to head (5ce68a1).
⚠️ Report is 31 commits behind head on master.

Files with missing lines Patch % Lines
vega/metals.py 33.33% 6 Missing ⚠️
vega/build_config.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
+ Coverage   38.27%   39.40%   +1.12%     
==========================================
  Files          30       30              
  Lines        3888     4477     +589     
  Branches      720      909     +189     
==========================================
+ Hits         1488     1764     +276     
- Misses       2255     2531     +276     
- Partials      145      182      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@julienguy julienguy left a comment

Choose a reason for hiding this comment

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

Looks good.
One request: please also add the reweighting of pairs according to zmin and zmax in the (now unused, but who knows) routine compute_metal_rp_dmat in metals.py.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds redshift bin filtering functionality to metal correlation matrices by introducing zmin and zmax configuration parameters. The changes enable filtering of metal matrix computations based on the redshift range of paired observations.

  • Adds zmin and zmax configuration parameters with defaults of 0.0 and 10.0 respectively
  • Implements redshift filtering in metal distortion matrix computation using the mean redshift of observation pairs
  • Extends the config builder to support and propagate these new parameters

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
vega/metals.py Adds zmin/zmax config reading and implements redshift-based weight filtering in compute_metal_dmat
vega/build_config.py Adds zmin/zmax to config builder options and propagates them to correlation configs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andreicuceu
Copy link
Owner

Hi @HiramHerrera, I see that you've added two new variables to the ini files for zmin and zmax. I think this is fine for now, but it would be great if we could just save these in the header of cf and xcf files (if they are not already there), and just read them from there. It seems to me that these are properties of the measured correlations, so treating them as variables that need to be set would just introduce potential errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants