-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
@RemingtonGerras (and whomever you were working with)- accept the invitation for the usc-cosmolab group and I can officially assign you those issues. |
There was a problem hiding this 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() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is k
here?
lya/.#analysis.py
Outdated
@@ -0,0 +1 @@ | |||
[email protected]:1580152665 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it!
@RemingtonGerras do you want to finish up this PR before the meeting today? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
Believe Christian and I have written the residual and objective functions. Untested, however...