Skip to content

Use CAMB alpha at target redshift for grafic output - #2

Open
ojessop01 wants to merge 4 commits into
masterfrom
codex/use-target_redshift-to-calculate-alpha
Open

Use CAMB alpha at target redshift for grafic output#2
ojessop01 wants to merge 4 commits into
masterfrom
codex/use-target_redshift-to-calculate-alpha

Conversation

@ojessop01

Copy link
Copy Markdown
Owner

Summary

  • allow target_redshift to update the CAMB isocurvature scaling and alpha computation
  • pass the computed alpha coefficient through to grafic output instead of using a hard-coded value

Testing

  • not run (not requested)

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread genetIC/src/ic.hpp
Comment on lines 760 to +763
void setCambDat(std::string cambFilePath) {
spectrum = std::make_unique<cosmology::CAMB<GridDataType>>(this->cosmology, cambFilePath);
const T targetRedshift = std::isnan(isocurvatureRedshift) ? cosmology.redshift : isocurvatureRedshift;

spectrum = std::make_unique<cosmology::CAMB<GridDataType>>(this->cosmology, cambFilePath, targetRedshift);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Default isocurvature redshift changed to IC redshift

When the user does not supply a target_redshift, setCambDat now always passes cosmology.redshift into the CAMB constructor because isocurvatureRedshift starts as NaN. That overrides CAMB’s default isocurvature_redshift of 21.0, so the growth rescale used in CAMB::setIsocurvatureRedshift and the resulting alpha coefficient are computed at the initial-condition redshift (e.g. z≈99) instead of the previous default of z=21. This silently changes the baryon/CDM split for all existing configurations that relied on the old default. Consider keeping the constructor default when target_redshift is unspecified.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant