Skip to content

Expose A_s via the Python wrapper (cosmo.A_s) - #14

Merged
oliverphilcox merged 1 commit into
masterfrom
add-A_s-accessor
Jul 27, 2026
Merged

Expose A_s via the Python wrapper (cosmo.A_s)#14
oliverphilcox merged 1 commit into
masterfrom
add-A_s-accessor

Conversation

@oliverphilcox

Copy link
Copy Markdown
Collaborator

The Python wrapper references self.pm.A_s internally (in get_current_derived_parameters and the fNL code) but never exposed a read-back accessor, so cosmo.A_s / cosmo.A_s() raised AttributeError even though cosmo.n_s worked.

This adds an A_s property mirroring the existing n_s accessor, returning CallableFloat(self.pm.A_s) so both cosmo.A_s and cosmo.A_s() work.

Fixes user reports that the scalar amplitude could not be read from a Class instance.

Expose the primordial scalar amplitude A_s via cosmo.A_s (and cosmo.A_s()),
mirroring the existing n_s accessor. Previously A_s was only used internally
and could not be read back from a Class instance.
@oliverphilcox
oliverphilcox merged commit ae4e9cf into master Jul 27, 2026
0 of 3 checks passed
@oliverphilcox
oliverphilcox deleted the add-A_s-accessor branch July 27, 2026 17:24
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.

1 participant