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

Wrote objective and residuals functions #13

Merged
merged 8 commits into from
Feb 14, 2020

Conversation

RemingtonGerras
Copy link
Contributor

Believe Christian and I have written the residual and objective functions. Untested, however...

@timothydmorton
Copy link
Collaborator

Referencing #7 #8

@timothydmorton
Copy link
Collaborator

@RemingtonGerras (and whomever you were working with)- accept the invitation for the usc-cosmolab group and I can officially assign you those issues.

Copy link
Collaborator

@timothydmorton timothydmorton left a comment

Choose a reason for hiding this comment

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

See comments

lya/analysis.py Outdated

def objective(pars, data):
"""Objective function to miminize
"""


return ((residuals(*pars, data)**2 / data.uncertainty**2).sum()
Copy link
Collaborator

Choose a reason for hiding this comment

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

the Data object doesn't have an attribute called .uncertainty; it's called .y_unc

Copy link
Collaborator

Choose a reason for hiding this comment

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

The current implementation of the data object has data.k, data.P_k, and data.P_k_unc attributes. Should we update the attributes here accordingly?

lya/analysis.py Outdated
@@ -22,11 +22,13 @@ def residuals(pars, data):
Data to be compared with model.
"""

return data.y - model(k, *pars)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is k here?

@@ -0,0 +1 @@
[email protected]:1580152665
Copy link
Collaborator

Choose a reason for hiding this comment

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

please delete this file from the repo with git rm lya/.#analysis.py --cached

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it!

@timothydmorton
Copy link
Collaborator

@RemingtonGerras do you want to finish up this PR before the meeting today?

Copy link
Collaborator

@timothydmorton timothydmorton left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@timothydmorton timothydmorton merged commit 9b6ac7e into usc-cosmolab:master Feb 14, 2020
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.

3 participants