pyLIMA.microlparallax

Created on Wed Oct 28 11:49:44 2015

@author: ebachelet

Module Contents

Classes

MLParallaxes ######## Parallax module ########

Functions

EN_trajectory_angle(piEN, piEE) Finf the angle between the East vector and the source trajectory (at t0par)
horizons_obscodes(observatory) Transform observatory names to JPL horizon codes.
optcallback(socket, command, option) Write by Tim Lister, thanks :)
compute_parallax_curvature(piE, delta_positions) Compute the curvature induce by the parallax of from
produce_horizons_ephem(body, start_time, end_time, observatory=’ELP’, step_size=‘60m’, verbose=False) Write by Tim Lister. Thanks for sharing :) Produce RA,DEC and distance from the Geocentric Center.
pyLIMA.microlparallax.TIMEOUT_JPL = 120[source]
pyLIMA.microlparallax.JPL_TYPICAL_REQUEST_TIME_PER_LINE = 0.002[source]
pyLIMA.microlparallax.EN_trajectory_angle(piEN, piEE)[source]

Finf the angle between the East vector and the source trajectory (at t0par)

Parameters:
  • piEN (float) – the North parallax component
  • piEE (float) – the East parallax component
Returns:

the angle in radians

Return type:

float

pyLIMA.microlparallax.horizons_obscodes(observatory)[source]

Transform observatory names to JPL horizon codes. Write by Tim Lister, thanks :)

Parameters:observatory (str) – the satellite name you would like to obtain ephemeris. As to be in the dictionnary JPL_HORIZONS_ID (exact name matching!).
Returns:the JPL ID of your satellite.
Return type:int
pyLIMA.microlparallax.optcallback(socket, command, option)[source]

Write by Tim Lister, thanks :)

pyLIMA.microlparallax.compute_parallax_curvature(piE, delta_positions)[source]

Compute the curvature induce by the parallax of from deltas_positions of a telescope.

Parameters:
Returns:

delta_tau and delta_u, the shift introduce by parallax

Return type:

array_like,array_like

class pyLIMA.microlparallax.MLParallaxes(event, parallax_model)[source]

Bases: object

######## Parallax module ########

This module compute the parallax shifts due to different parallax effects.

Attributes :

event : the event object on which you perform the fit on. More details on the event module.

parallax_model : The parallax effect you want to fit. Have to be a list containing the parallax model name and the reference time to_par (in JD unit). Example : [‘Annual’,2457000.0]

AU : the astronomical unit, as defined by astropy (in meter)

speed_of_light : the speed light c, as defined by astropy (in meter/second)

Earth_radius : the Earth equatorial radius, as defined by astropy (in meter)

target_angles_in_the_sky : a list containing [RA,DEC] of the target in radians unit.

Parameters:
  • event – the event object on which you perform the fit on. More details on the event module.
  • parallax_model – The parallax effect you want to fit. Have to be a list containing the
parallax model name
and the to_par value. Example : [‘Annual’,2457000.0]
North_East_vectors_target(self)[source]

This function define the North and East vectors projected on the sky plane perpendicular to the line of sight (i.e the line define by RA,DEC of the event).

HJD_to_JD(self, time_to_transform)[source]

Transform the input time from HJD to JD.

Parameters:time_to_transform (array_like) – the numpy array containing the time in HJD you want

to transform in JD. :return: the time in JD :rtype: array_like

parallax_combination(self, telescope)[source]

Compute, and set, the deltas_positions attributes of the telescope object inside the list of telescopes. deltas_positions is the offset between the position of the observatory at the time t, and the center of the Earth at the date to_par. More details on each parallax functions.

Parameters:telescope (object) – a telescope object on which you want to set the deltas_positions

due to parallax.

annual_parallax(self, time_to_treat)[source]

Compute the position shift due to the Earth movement. Please have a look on : “Resolution of the MACHO-LMC-5 Puzzle: The Jerk-Parallax Microlens Degeneracy” Gould, Andrew 2004. http://adsabs.harvard.edu/abs/2004ApJ…606..319G

Parameters:time_to_treat – a numpy array containing the time where you want to compute this

effect. :return: the shift induce by the Earth motion around the Sun :rtype: array_like

WARNING : this is a geocentric point of view.
slalib use MJD time definition, which is MJD = JD-2400000.5
terrestrial_parallax(self, time_to_treat, altitude, longitude, latitude)[source]

Compute the position shift due to the distance of the obervatories from the Earth center. Please have a look on : “Parallax effects in binary microlensing events” Hardy, S.J and Walker, M.A. 1995. http://adsabs.harvard.edu/abs/1995MNRAS.276L..79H

Parameters:time_to_treat – a numpy array containing the time where you want to compute this

effect. :param altitude: the altitude of the telescope in meter :param longitude: the longitude of the telescope in degree :param latitude: the latitude of the telescope in degree :return: the shift induce by the distance of the telescope to the Earth center. :rtype: array_like

WARNING : slalib use MJD time definition, which is MJD = JD-2400000.5

space_parallax(self, time_to_treat, satellite_name, telescope)[source]

Compute the position shift due to the distance of the obervatories from the Earth center. Please have a look on : “Parallax effects in binary microlensing events” Hardy, S.J and Walker, M.A. 1995. http://adsabs.harvard.edu/abs/1995MNRAS.276L..79H

Parameters:time_to_treat – a numpy array containing the time where you want to compute this

effect. :param satellite_name: the name of the observatory. Have to be recognize by JPL HORIZON. :return: the shift induce by the distance of the telescope to the Earth center. :rtype: array_like WARNING : slalib use MJD time definition, which is MJD = JD-2400000.5

lonely_satellite(self, time_to_treat, telescope)[source]
pyLIMA.microlparallax.produce_horizons_ephem(body, start_time, end_time, observatory='ELP', step_size='60m', verbose=False)[source]

Write by Tim Lister. Thanks for sharing :) Produce RA,DEC and distance from the Geocentric Center.