pyLIMA.microlmodels module¶
Created on Mon Dec 7 10:32:13 2015
@author: ebachelet
-
class
pyLIMA.microlmodels.
MLModel
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
object
######## MLModels module ########
This class defines the model you want to fit your data to. Model is the parent class, each model is a child class (polymorphism), for example ModelPSPL.
Attributes :
event : A event class which describe your event that you want to model. See the event module.
- parallax_model : Parallax model you want to use for the Earth types telescopes.
Has to be a list containing the model in the available_parallax parameter and the value of topar. Have a look here for more details : http://adsabs.harvard.edu/abs/2011ApJ...738...87S
‘Annual’ –> Annual parallax ‘Terrestrial’ –> Terrestrial parallax ‘Full’ –> combination of previous
topar –> a time in HJD choosed as the referenced time fot the parallax
If you have some Spacecraft types telescopes, the space based parallax is computed if parallax is different of ‘None’ More details in the microlparallax module
xallarap_model : not available yet
orbital_motion_model : not available yet
‘None’ –> No orbital motion ‘2D’ –> Classical orbital motion ‘3D’ –> Full Keplerian orbital motion
- toom –> a time in HJD choosed as the referenced time fot the orbital motion
- (Often choose equal to topar)
More details in the microlomotion module
source_spots_model : not available yet
‘None’ –> No source spots
More details in the microlsspots moduleyoo_table : an array which contains the Yoo et al table
Jacobian_flag : a flag indicated if a Jacobian can be used (‘OK’) or not.
model_dictionnary : a python dictionnary which describe the model parameters
pyLIMA_standards_dictionnary : the standard pyLIMA parameters dictionnary
- fancy_to_pyLIMA_dictionnary : a dictionnary which described which fancy parameters replace a standard pyLIMA
- parameter. For example : {‘logrho’: ‘rho’}
pyLIMA_to_fancy : a dictionnary which described the function to transform the standard pyLIMA parameter to the fancy one. Example : {‘logrho’: lambda parameters: np.log10(parameters.rho)}
fancy_to_pyLIMA : a dictionnary which described the function to transform the fancy parameters to pyLIMA standards. Example : {‘rho’: lambda parameters: 10 ** parameters.logrho}
parameters_guess : a list containing guess on pyLIMA parameters.
Parameters: - event (object) – a event object. More details on the event module.
- parallax (list) – a list of [string,float] indicating the parallax model you want and to_par
- xallarap (list) – a list of [string,float] indicating the xallarap mode.l. NOT WORKING NOW.
- orbital_motion (list) – a list of [string,float] indicating the parallax model you want and to_om. NOT WORKING NOW.
- source_spots (string) – a string indicated the source_spots you want. NOT WORKING.
-
compute_pyLIMA_parameters
(fancy_parameters)[source]¶ Realize the transformation between the fancy parameters to fit to the standard pyLIMA parameters needed to compute a model.
Parameters: fancy_parameters (list) – the parameters you fit Returns: pyLIMA parameters Return type: object (namedtuple)
-
compute_the_microlensing_model
(telescope, pyLIMA_parameters)[source]¶ Compute the microlens model according the injected parameters. This is modified by child submodel sublclass, if not the default microlensing model is returned.
Parameters: Returns: the microlensing model
Return type: array_like
-
define_model_parameters
()[source]¶ Define the model parameters dictionnary. It is different to the pyLIMA_standards_dictionnary if you have some fancy parameters request.
-
derive_telescope_flux
(telescope, pyLIMA_parameters, amplification)[source]¶ Compute the source/blending flux
Parameters: Returns: the source and the blending flux
Return type:
-
fancy_parameters_to_pyLIMA_standard_parameters
(fancy_parameters)[source]¶ Transform the fancy parameters to the pyLIMA standards. The output got all the necessary standard attributes, example to, uo, tE...
Parameters: fancy_parameters (object) – the fancy_parameters as namedtuple Returns: the pyLIMA standards are added to the fancy parameters Return type: object
-
model_type
¶
-
pyLIMA_standard_parameters_to_fancy_parameters
(pyLIMA_parameters)[source]¶ - Transform the the pyLIMA standards parameters to the fancy parameters. The output got all
- the necessary fancy attributes.
Parameters: pyLIMA_parameters (object) – the standard pyLIMA parameters as namedtuple Returns: the fancy parameters are added to the fancy parameters Return type: object
-
source_trajectory
(telescope, to, uo, tE, pyLIMA_parameters)[source]¶ Compute the microlensing source trajectory associated to a telescope for the given parameters.
Parameters: Returns: source_trajectory_x, source_trajectory_y the x,y compenents of the source trajectory
Return type: array_like,array_like
-
class
pyLIMA.microlmodels.
ModelDFSPL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a DFSPL model. From Hwang et al 2013 : http://iopscience.iop.org/article/10.1088/0004-637X/778/1/55/pdf
Parameters: Returns: magnification, impact_parameter
Return type: array_like,array_like
-
-
class
pyLIMA.microlmodels.
ModelDSPL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a DSPL model. From Hwang et al 2013 : http://iopscience.iop.org/article/10.1088/0004-637X/778/1/55/pdf
Parameters: Returns: magnification, impact_parameter
Return type: array_like,array_like
-
-
class
pyLIMA.microlmodels.
ModelFSBL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a USBL model.
Parameters: Returns: magnification
Return type: array_like
-
model_type
¶ Return the kind of microlensing model.
:returns:FSBL :rtype: string
-
-
class
pyLIMA.microlmodels.
ModelFSPL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
Jacobian_model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a FSPL model. More details in microlmagnification module.
Parameters: Returns: magnification, impact_parameter
Return type: array_like,array_like
-
model_Jacobian
(telescope, pyLIMA_parameters)[source]¶ The derivative of a FSPL model
Parameters: Returns: jacobi
Return type: array_like
-
-
class
pyLIMA.microlmodels.
ModelPSBL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a USBL model.
Parameters: Returns: magnification, impact_parameter
Return type: array_like,array_like
-
model_type
¶ Return the kind of microlensing model.
:returns:PSBL :rtype: string
-
-
class
pyLIMA.microlmodels.
ModelPSPL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
Jacobian_model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a PSPL model. More details in microlmagnification module.
Parameters: Returns: magnification, impact_parameter
Return type: array_like,array_like
-
model_Jacobian
(telescope, pyLIMA_parameters)[source]¶ The derivative of a PSPL model
Parameters: Returns: jacobi
Return type: array_like
-
-
class
pyLIMA.microlmodels.
ModelUSBL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
model_magnification
(telescope, pyLIMA_parameters)[source]¶ The magnification associated to a USBL model.
Parameters: Returns: magnification
Return type: array_like
-
-
class
pyLIMA.microlmodels.
ModelVariablePL
(event, model_arguments=[], parallax=['None', 0.0], xallarap='None', orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Bases:
pyLIMA.microlmodels.MLModel
-
compute_the_microlensing_model
(telescope, pyLIMA_parameters)[source]¶ Compute the microlens model according the injected parameters. This is modified by child submodel sublclass, if not the default microlensing model is returned.
Parameters: Returns: the microlensing model
Return type: array_like
-
-
pyLIMA.microlmodels.
create_model
(model_type, event, model_arguments=[], parallax=['None', 0.0], xallarap=['None'], orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True)[source]¶ Load a model according to the supplied model_type. Models are expected to be named Model<model_type> e.g. ModelPSPL
Parameters: model_type (string) – Model type e.g. PSPL Returns: Model object for given model_type