ebachelet / pyLIMA

GNU General Public License v3.0
31 stars 8 forks source link

Need help: Generating Lightcurves #37

Closed lisadang27 closed 1 year ago

lisadang27 commented 5 years ago

Hello, I am trying to generate lightcurves for an event as seen from 2 observatories, Earth and Spitzer. I am not trying to fit any data.

I was wondering if it would be possible to add a tutorial for simply generating lightcurves, i.e. no fitting involve or noise simulation.

Thanks! Lisa

rachel3834 commented 5 years ago

Hi Lisa,

You can certainly simulate lightcurves from Earth and Spitzer. We have a Python notebook tutorial for this if you look here.

In box 6 you will see some text showing you how to adapt this example to simulate lightcurves from a space-based observatory. Although the example given is Gaia, pyLIMA can handle any spacecraft for which it can get ephemeris information - including Spitzer.

All you have to do is change the name of the spacecraft to be the name recognized by the JPL Horizons system, which in this case I think is "Spitzer Space Telescope" (though please check this!).

pyLIMA will do a live-lookup from JPL Horizons for you, or you can download the observer-format table data and include it directly.

I hope this helps!

lisadang27 commented 5 years ago

Hi Rachel! Thanks for the response, this is very helpful! I was hoping there would be an option to turn off the white (poisson) noise as well. Thanks!

rachel3834 commented 5 years ago

Hi Lisa,

Sounds like the easiest option for you would be to use the pyLIMA's function for computing the microlensing magnification, which can of course easily be converted into flux or magnitudes.

Here's an example code to guide you. I seem to be having trouble contacting JPL Horizons system, so I suggest you use the online interface to generate the ephemeris table for Spitzer, then load it (see the commented-out text).

Hope this helps! simulate_spitzer_earth_lens.py.gz

ebachelet commented 5 years ago

Hi Lisa

Thanks for the contribution. Is it working for you now?