Skip to content

Adding aliases for Observables#120

Open
SBouchard01 wants to merge 7 commits intocosmodesifrom
cosmodesi-aliases
Open

Adding aliases for Observables#120
SBouchard01 wants to merge 7 commits intocosmodesifrom
cosmodesi-aliases

Conversation

@SBouchard01
Copy link
Collaborator

@SBouchard01 SBouchard01 commented Dec 6, 2025

This PR adds aliases for the Observables classes, as described in #116

Warning

This still needs some works and requires #119 and #118 to be merged in cosmodesi, as this branch is a child of cosmodesi-bgs_obs (which is a child of cosmodesi-emc_obs)

If we want to avoid confusion, we need to clarify some naming conventions :

  1. The alias (or stat_name) of each observable needs to be unique (it's not the case in the VERSUS observables, this is why they don't have aliases yet - @ntbfin00 )
  2. The name of a file containing the Observable class should be different from the alias value, to not confuse the namespace (see Observables aliases #116 discussion on this)
    In some cases, it makes sense to rename the observables aliases and/or stat_name values (e.g. pk could be a bit more clear than spectrum for the power spectrum observable ? 🤔);
    In other cases, we could just rename the file name (e.g. minkowski.py could become minkowski_functionals.py)
    This includes: tpcf, bispectrum, dd_knn, minkowski, projected_tpcf, recon_spectrum, spectrum, wst

Important

This would require to recreate the compressed files !

What needs to be done to have this draft ready for review

  1. Each observable needs to have an alias (that ideally should match the stat_name value of its observable but this is not mandatory, just less confusing)
  2. The aliases and file names should be different

@SBouchard01 SBouchard01 added enhancement New feature or request Observables Related to acm.observables labels Dec 6, 2025
@SBouchard01 SBouchard01 linked an issue Dec 6, 2025 that may be closed by this pull request
@SBouchard01 SBouchard01 mentioned this pull request Dec 6, 2025
@SBouchard01 SBouchard01 requested a review from epaillas January 30, 2026 23:50
@SBouchard01 SBouchard01 marked this pull request as ready for review January 30, 2026 23:50
@SBouchard01
Copy link
Collaborator Author

SBouchard01 commented Jan 30, 2026

Warning

VIDE aliases will need to be implemented after merging #146, I left the current classes names for now

Also, I commented out the GalaxyOverdensityPDF as there is no pdf.py file in acm.observables.emc

As mentioned in this comment, the namespace can now be a bit confusing for the files that also match the stat_name/alias of the Observables. From what I found on those implementations it's still OK to do it, but we just need to be careful about that

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

Labels

enhancement New feature or request Observables Related to acm.observables

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Observables aliases

1 participant