Simulations
- pyLIMA.simulations.simulator.moon_illumination(sun, moon)
Compute the Moon illuminations
- Parameters:
sun (array, SkyCoord of the Sun)
moono (array, SkyCoord of the Moon)
- Returns:
illumniation
- Return type:
array, the Moon illumination
- pyLIMA.simulations.simulator.simulate_a_microlensing_event(name='Microlensing pyLIMA simulation', ra=270, dec=-30)
Function to find initial DSPL guess
- Parameters:
name (str, event name)
ra (float, the event right ascension)
dec (float, the event dec)
- Returns:
fake_event
- Return type:
object, an event object
- pyLIMA.simulations.simulator.simulate_a_telescope(name, time_start=2460000, time_end=2460500, sampling=0.25, uniform_sampling=False, timestamps=[], location='Earth', spacecraft_name=None, spacecraft_positions={'astrometry': [], 'photometry': []}, camera_filter='I', altitude=0, longitude=0, latitude=0, bad_weather_percentage=0.0, minimum_alt=20, moon_windows_avoidance=20, maximum_moon_illumination=100.0, photometry=True, astrometry=True, pixel_scale=100, ra=270, dec=-30)
Simulate a telescope. Can mimic real observations (Moon and Sun avoidance, bad weather etc…), having uniform sampling or custom timerange.
- Parameters:
name (str, event name)
time_start (float, the JD time start of observations)
time_end (float, the JD time end of observations)
sampling (float, the sampling rate (in days))
uniform_sampling (bool, turn on/off any observational constraints)
timestamps (array, an array of time)
location (str, Earth or Space)
spacecraft_name (str, the name of the satellite)
spacecraft_positions (dict, give the JPL Horizons positions)
camera_filter (str, the filter of observations)
altitude (float, the telescope altitude in m)
longitude (float, the telescope longitude)
latitude (float, the telescope latitde)
bad_weather_percentage (float, fraction of nights lost due to bad weather)
minimum_alt (float, minimum altitude of observations in degrees)
moon_windows_avoidance (float, minimum distance to the Moon in degrees)
maximum_moon_illumination (float, maximum allowed Moon brightness)
photometry (bool, simulate photometric observations)
astrometry (bool, simulate astrometric observations)
pixel_scale (float, the pixel scale of the camera in mas/pix)
ra (float, right ascension of the target in degrees)
dec (float, declination of the target in degrees)
- Returns:
telescope
- Return type:
object, a telescope object
- pyLIMA.simulations.simulator.simulate_astrometry(model, pyLIMA_parameters, add_noise=True)
Simulate the astrometric signal in the telescopes according to the model and parameters
- Parameters:
model (object, a microlensing model object)
pyLIMA_parameters (dict, a pyLIMA_parameters object)
add_noise (bool, adding Poisson noise or not)
- pyLIMA.simulations.simulator.simulate_fluxes_parameters(list_of_telescopes, source_magnitude=[10, 20], blend_magnitude=[10, 20])
Compute the source and blend fluxes for a list of telescopes
- Parameters:
list_of_telescopes (list, a list of telescope objects)
source_magnitude (list, [mag_min,max_max] range of the source magnitudes)
blend_magnitude (list, [mag_min,max_max] range of the blend magnitudes)
- Returns:
fake_fluxes_telescopes
- Return type:
list, a list of 2*Ntelescopes fluxes
- pyLIMA.simulations.simulator.simulate_lightcurve(model, pyLIMA_parameters, add_noise=True, efficiency=None)
Simulate the fluxes in the telescopes according to the model and parameters
- Parameters:
model (object, a microlensing model object)
pyLIMA_parameters (dict, a pyLIMA_parameters object)
add_noise (bool, adding Poisson noise or not)
- pyLIMA.simulations.simulator.simulate_microlensing_model_parameters(model)
Given a microlensing model, compute a random parameters (uniform distribution in the bounds)
- Parameters:
model (object, a microlensing model)
- Returns:
fake_parameters
- Return type:
list, a list of simulated parameters
- pyLIMA.simulations.simulator.time_simulation(time_start, time_end, sampling, bad_weather_percentage)
Simulate the timestamps
- Parameters:
time_start (float, the JD time start of observations)
time_end (float, the JD time end of observations)
bad_weather_percentage (float, fraction of nights lost due to bad weather)
- Returns:
time_of_observations
- Return type:
array, an array of time