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

general polynomial detrending #105

Open
petigura opened this issue Nov 23, 2017 · 2 comments
Open

general polynomial detrending #105

petigura opened this issue Nov 23, 2017 · 2 comments
Assignees

Comments

@petigura
Copy link
Collaborator

petigura commented Nov 23, 2017

@awhoward, @bjfultn, @sblunt,

Based on @awhoward's question about the decorrelation fitting, I think we should start a discussion about implementing a likelihood class that can incorporate polynomial decorrelation an arbitrary string of independent variables e.g. svals, halpha, etc. This is low priority, and I don't think we should stress about getting this in v1.0.X

# define params as before, but with
params['c0'].value = 0
params['c1'].value = 1
like = PolyDecorLikelihood(t, y, yerr, x, xerr, prefix='c', deg=1)

Then instead of the standard likelihood calc

nresid = (y - model)/yerr
_logprob = 0.5 * np.sum((nresid)**2)

we would use:

decor = [params['c0'],params['c1']]
nresid = (y - model - polyval(decor,x))/yerr
_logprob = 0.5 * np.sum((nresid)**2)
@petigura
Copy link
Collaborator Author

I can take the lead on implementing this since I need to do this for my K2-24 project.

@bjfultn
Copy link
Contributor

bjfultn commented Jan 5, 2018

When you get to this, lets repurpose the radvel.plotting.correlation_plot function to plot the correlations.

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

No branches or pull requests

2 participants