Welcome to pyLIMA documentation!
pyLIMA is the first microlensing analysis open-source software, primarly designed to fit real data. But more can be done, see the Examples. You can find more information on the pyLIMA paper(s).
Quickstart
After the Installation step, you can check the version and run a quick test fit after downloading the data:
import matplotlib.pyplot as plt
import numpy as np
import pyLIMA
print(pyLIMA.__version__)
from pyLIMA.fits import TRFfit
from pyLIMA.models import PSPL_model
from pyLIMA import event
from pyLIMA import telescopes
your_event = event.Event()
your_event.name = 'pyLIMA example'
data_1 = np.loadtxt('path_to_the_data/Survey_1.dat')
telescope_1 = telescopes.Telescope(name='OGLE',
camera_filter='I',
light_curve=data_1.astype(float),
light_curve_names=['time', 'mag', 'err_mag'],
light_curve_units=['JD', 'mag', 'mag'])
telescope_1.plot_data()
plt.show()
your_event.telescopes.append(telescope_1)
pspl = PSPL_model.PSPLmodel(your_event)
my_fit = TRFfit(pspl)
my_fit.model_parameters_guess = [79.9, 0.008, 10.1]
my_fit.fit()
my_fit.fit_outputs()
For more details, check the Conventions and pyLIMA Modules.
User Guide
pyLIMA modules details
Here is the (hopefully up-to-date) documentation for all submodules.