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

Offsets computed in magnitude but not flux? #14

Open
chto opened this issue Sep 27, 2016 · 3 comments
Open

Offsets computed in magnitude but not flux? #14

chto opened this issue Sep 27, 2016 · 3 comments

Comments

@chto
Copy link

chto commented Sep 27, 2016

Hi @mtewes !

I am learning pycs with @drphilmarshall, while working through the SLTimer notebooks that Milan wrote this summer. It looks as though the offsets found by optimizing a spline model are only in magnitude, and not also in flux - is this a bug or a feature?

Thanks!

Chun-Hao

def spl(lcs):
    spline = pycs.spl.topopt.opt_rough(lcs, nit=5, knotstep=50)
    for l in lcs:
        l.resetml()
    spline = pycs.spl.topopt.opt_rough(lcs, nit=5, knotstep=30)
    spline = pycs.spl.topopt.opt_fine(lcs, nit=10, knotstep=20)
    return spline

spline = spl(lcs)

print(lcs[1].longinfo())

Trial/B
192 points (total), 0 of which are masked
4 seasons (gap: >60), gap length : 164.0 +/- 33.8 days
Sampling : median 4.0, mean 4.4, max 25.1, min 0.83 days
Shifts : (27.97498,-0.64693,0.00) [days, mag, flux]
Colour : blue
Common properties :
All properties :
Comments :
Imported from trialcurves.txt, columns (1, 4, 5)

@vbonvin
Copy link
Contributor

vbonvin commented Sep 28, 2016

Hi @chto ,

It's a feature. The functions you are using to optimize the models (opt_rough and opt_fine) do not contain, by choice, any flux optimization. If you think you need some, the best thing to do is to define an optimizing function yourself and add the flux optimization in it. To do that, you can use the built-in function pycs.spl.multiopt.opt_fluxshift.

@drphilmarshall
Copy link

Thanks @vbonvin ! I guess under the assumption that the image brightnesses are being affected lensing (either by the macro model or microlensing by the stars), then its the magnitude shift that is important (because lens magnification applies a multiplicative factor in flux, and so an additive offset in magnitude). I like what you write in the online documentation, that a shift in flux corresponds to a deformation in the light curve in magnitudes - so it makes sense that we are only interested in magnitude shifts. Thanks!

@mtewes
Copy link
Member

mtewes commented Sep 29, 2016

Hi all, and thanks @vbonvin for answering while I was travelling ! Indeed, I would not worry about flux shifts in this first approach. Also because it's a bit tricky to optimize them.

We implemented them as we do see apparent "flux shifts" in a few real datasets (if interested, see the J1001 light curves http://arxiv.org/abs/1306.5105). This can be due to "contamination" of the individual quasar image photometry by some additional light source (say the lens galaxy, although we try to avoid this of course), or by the combination of microlensing and quasar structure (e.g., ML could bring differential magnification between time-variable blobs around the central engine).

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

No branches or pull requests

4 participants