### Create your event. This function create an event class, more details here [pyLIMA documentation](file/../../doc/build/html/pyLIMA.event.html) # First import the required libraries import numpy as np import matplotlib.pyplot as plt import os, sys lib_path = os.path.abspath(os.path.join('../')) sys.path.append(lib_path) from pyLIMA import microlsimulator ### Event : Name = A spectacular double source point lens', RA = 270, DEC = -30 my_own_creation = microlsimulator.simulate_a_microlensing_event( name='A spectacular double source point lens', ra=270, dec=-30) #Create some telescopes. This function create a telescope class, more details here [pyLIMA documentation](file/../../doc/build/html/pyLIMA.telescopes.html) #You need to create a telescope class for each filter with a different name. For example here, SAAO_I and SAAO_V. #We need to build telescopes before the model that we gonna simulate because models need informations about filters and how many telescopes did observe your simulation. # Create some telescopes # Name = survey,your_event, location = 'Earth', start_obs =2457465.500000, end_obs = 2457665.500000, # sampling(hours) = 4, location='Earth', uniform_sampling=False, filter = 'I', altitude = 1000 m, longitude = -109.285399, # latitude = -27.130814, bad_weather_percentage = 10%, moon_windows_avoidance (degree)=30, # minimum_alt=30) my_survey = microlsimulator.simulate_a_telescope('survey', my_own_creation, 2457365.500000, 2457965.500000,
def test_simulate_a_microlensing_event(): event = microlsimulator.simulate_a_microlensing_event() assert event.ra == 270 assert event.dec == -30 assert event.name == 'Microlensing pyLIMA simulation'
def generate_name(data): name = data.pop() return name ZP = 27.615 from pyLIMA import microlsimulator from pyLIMA import microlcaustics from pyLIMA import microlmodels HEADER = 'Name Type to uo tE rho log_s log_q alpha f_source g_blending to-time_anomaly \n' my_own_creation = microlsimulator.simulate_a_microlensing_event( name='A binary lens observed by WFIRST', ra=270, dec=-30) wfirst1 = microlsimulator.simulate_a_telescope('WFIRST', my_own_creation, 2459000, 2459000 + 72, 0.25, 'Space', 'W149', uniform_sampling=True) wfirst2 = microlsimulator.simulate_a_telescope('WFIRST', my_own_creation, 2459000 + 365.25, 2459000 + 72 + 365.25, 0.25, 'Space',