rodluger / starry

Tools for mapping stars and planets.
https://starry.readthedocs.io
MIT License
142 stars 32 forks source link

Fitting radius variations with multi-wavelength maps #286

Open taylorbell57 opened 3 years ago

taylorbell57 commented 3 years ago

Is your feature request related to a problem? Please describe. The multi-wavelength feature does not allow one to fit for differences in the radius ratio at different wavelengths. This makes fitting a JWST phase curve or transit with starry an impossible task without fitting each wavelength independently (which comes at a huge computation cost).

Describe the solution you'd like The r value for secondary objects should accept array-like inputs in a similar manner to map.y

taylorbell57 commented 2 years ago

Hi @rodluger, is this a feature you have looked into at all? I'm looking to do simultaneous, multi-wavelength fitting of JWST phase curves and need to be able to fit for the transmission spectra. Do you have a feel for how easy/hard this would be to implement? If it is likely to be fairly easy (a day or few of work) but you simply don't have the time, I might be able to spend some time on it myself

rodluger commented 2 years ago

Hmm. It's certainly doable but not easy given the way the code is structured. But I can certainly help you write a workaround script (and we can think about implementing it in starry later). Can you give me a MWE of the computationally expensive way you're currently going about it with starry?

taylorbell57 commented 2 years ago

I haven't actually implemented it yet, but the only alternative I could think of was for N wavelengths making N primary, N secondary, and N system objects and using the same orbital parameters for all those objects while each would have different planetary radius, amp, and map coefficients. I haven't tried that to see how slow it actually is, but I can't imagine that would perform well and it wouldn't take advantage of the other already-written capabilities for multi-wavelength computations

dfm commented 2 years ago

This is something I've been working on a little bit and I have thoughts! I'm not using starry directly, or really fitting phase curves, I've mostly been thinking about robust but tractable methods for fitting the radius ratio variations. I'm hoping to sketch this out somewhere soon, but I don't have anything sensible written down to share yet. The basic idea is that I linearize the model in Rp/Rs (and, in my case, limb darkening params) around a fiducial model, which allows me to infer the radius variations without introducing all these extra parameters. I expect something like this could play nice with starry, but @rodluger might have cleverer ideas within the existing framework!

catrionamurray commented 1 year ago

Hi! Just wondering if there's been any update on this issue? I also have an interest in vectorizing $r_p$ and I'm currently having to create N starry systems (as Taylor suggests), one for each wavelength (doable just very slow).