Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FunctionNode and basic cosmology #33

Merged
merged 14 commits into from
Jul 15, 2024
Merged

Add FunctionNode and basic cosmology #33

merged 14 commits into from
Jul 15, 2024

Conversation

jeremykubica
Copy link
Contributor

@jeremykubica jeremykubica commented Jul 15, 2024

This is a relatively substantial PR that changes how the TDAstro DAG works in a few import ways:

  1. ParameterizedNodes have a clearer list of what type of setters they accept and cleaner logic to determine which type to use.
  2. Create a new FunctionNode class to the evaluation DAG that allows users to wrap a function, such as random number generation or cosmology computation. The FunctionNode is based off the ParameterizedNode so that it keeps sampling in sync when evaluating the function.
  3. Add a redshift computation function to both support cosmology and demonstrate how the new function nodes work.

src/tdastro/astro_utils/cosmology.py Outdated Show resolved Hide resolved
tests/tdastro/sources/test_physical_models.py Outdated Show resolved Hide resolved
@jeremykubica jeremykubica requested a review from hombit July 15, 2024 14:44
Fix the distance kind as "luminosity"
Copy link
Contributor

@hombit hombit 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, than k you

Copy link
Member

@OliviaLynn OliviaLynn 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

Copy link
Contributor

@mi-dai mi-dai 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 to me!

@jeremykubica jeremykubica merged commit ac84552 into main Jul 15, 2024
4 checks passed
@jeremykubica jeremykubica deleted the dag branch July 15, 2024 18:45
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