While adding documentation for the forecast unit conventions, we (me and @0Navin0 ) noticed that the data-vector and covariance paths appear to use different DeltaSigma amplitude conventions.
This issue is intended to determine whether the current behavior is intentional or whether the conventions should be harmonized.
Current implementation
Data-vector path
DeltaSigmaCalculator returns:
delta_sigma_msun_mpc2 = np.asarray(mean_sigma - sigma, dtype=float)
delta_sigma_msun_pc2 = delta_sigma_msun_mpc2 / 1.0e12
return np.asarray(delta_sigma_msun_pc2, dtype=float)
and the corresponding docstring states:
Returns:
Excess surface density DeltaSigma(R) in
M_sun / pc^2.
This suggests that the forecast data vector is currently expressed in:
Covariance path
The covariance builder uses:
sigma_crit_prefactor_msun_h_pc2()
whose docstring states:
This is the inverse of the prefactor used to compute comoving
Sigma_crit^{-1} in units of pc^2 / (Msol h).
It is intended for calculations where distances are supplied
in Mpc / h and DeltaSigma-like quantities are expressed in
Msol h / pc^2.
This suggests that the covariance normalization is written assuming:
for DeltaSigma-like quantities.
Question
Are these two conventions intentionally different?
If not, should the forecast data vector and covariance calculations be updated to use a single consistent DeltaSigma amplitude convention throughout the package?
If the distinction is intentional, we should document the rationale explicitly.
How to inspect the relevant code
A quick way to locate the relevant implementation is:
grep -R "delta_sigma\|Sigma\|sigma_crit\|msun\|pc2\|rho_critical" -n src/dsf
The most relevant files are:
src/dsf/data_vector/delta_sigma_builder.py
src/dsf/utils/converters.py
src/dsf/covariance/cov_builder.py
src/dsf/covariance/ingredients/sigma_crit.py
Suggested outcome
Either:
- Confirm that the current conventions are correct and document them clearly.
or
- Harmonize the data-vector and covariance paths so that DeltaSigma amplitudes use a single convention throughout DSF.
While adding documentation for the forecast unit conventions, we (me and @0Navin0 ) noticed that the data-vector and covariance paths appear to use different
DeltaSigmaamplitude conventions.This issue is intended to determine whether the current behavior is intentional or whether the conventions should be harmonized.
Current implementation
Data-vector path
DeltaSigmaCalculatorreturns:and the corresponding docstring states:
This suggests that the forecast data vector is currently expressed in:
Covariance path
The covariance builder uses:
sigma_crit_prefactor_msun_h_pc2()whose docstring states:
This suggests that the covariance normalization is written assuming:
for DeltaSigma-like quantities.
Question
Are these two conventions intentionally different?
If not, should the forecast data vector and covariance calculations be updated to use a single consistent DeltaSigma amplitude convention throughout the package?
If the distinction is intentional, we should document the rationale explicitly.
How to inspect the relevant code
A quick way to locate the relevant implementation is:
grep -R "delta_sigma\|Sigma\|sigma_crit\|msun\|pc2\|rho_critical" -n src/dsfThe most relevant files are:
Suggested outcome
Either:
or