pyLIMA.telescopes module

Created on Thu Aug 27 16:39:32 2015

@author: ebachelet

class pyLIMA.telescopes.Telescope(name='NDG', camera_filter='I', light_curve_magnitude=None, light_curve_magnitude_dictionnary=None, light_curve_flux=None, light_curve_flux_dictionnary=None, reference_flux=0.0, clean_the_lightcurve='Yes', location='Earth', spacecraft_name=None)[source]

Bases: object

######## Telescope module ########

This class create a telescope object.

Attributes :

location : The location of your observatory. Should be “Earth” (default) or “Space”.

altitude : Altitude in meter of the telescope. Default is 0.0 (sea level).

longitude : Longitude of the telescope in degrees. Default is 0.57.

latitude : Latitude in degrees. Default is 49.49 .

gamma : (Microlensing covention) Limb darkening coefficient \(\Gamma\) associated to the filter.
The classical (Milne definition) linear limb darkening coefficient can be found using: u=(3*gamma)/(2+gamma). Default is 0.0 (i.e uniform source brightness)

lightcurve_magnitude : a numpy array describing your data in magnitude.

lightcurve_magnitude_dictionnary : a python dictionnary to transform the lightcurve_magnitude
input to pyLIMA convention.

lightcurve_flux : a numpy array describing your data in flux.

lightcurve_flux_dictionnary : a python dictionnary to transform the lightcurve_flux input to pyLIMA convention.

reference_flux : a float used for the transformation of difference fluxes to real fluxes. Default is 10000.0 .

deltas_positions : a list containing the position shift of this observatory due to parallax.
Default is an empty list. More details in microlparallax.
Parameters:
  • name (string) – name of the telescope. Default is ‘NDG’
  • camera_filter (string) – telescope filter used. Should be a string which follows the convention of : ” Gravity and limb-darkening coefficients for the Kepler, CoRoT, Spitzer, uvby, UBVRIJHK, and Sloan photometric systems” Claret, A. and Bloemen, S. 2011A&A...529A..75C. For example, ‘I’ (default) is Johnson_Cousins I filter and ‘i’’ is the SDSS-i’ Sloan filter.
  • light_curve_magnitude (array_like) – a numpy array with time, magnitude and error in magnitude. Default is an None.
  • light_curve_magnitude_dictionnary (dict) – a python dictionnary that informs your columns convention. Used to translate to pyLIMA convention [time,mag,err_mag]. Default is {‘time’: 0, ‘mag’ : 1, ‘err_mag’ : 2 }
  • light_curve_flux (array-like) – a numpy array with time, flux and error in flux. Default is an None.
  • light_curve_flux_dictionnary (dict) – a python dictionnary that informs your columns convention. Used to translate to pyLIMA convention [time,flux,err_flux]. Default is {‘time’: 0, ‘flux’ : 1, ‘err_flux’ : 2 }
  • reference_flux (float) – a float used for the transformation of difference fluxes to real fluxes. Default is 0.0 .
:param str clean_the_lightcurve : a string indicated if you want pyLIMA to clean your lightcurves.
Highly recommanded!
arrange_the_lightcurve_columns(choice)[source]

Rearange the lightcurve to the pyLIMA convention.

Parameters:choice (string) – ‘magnitude’ or ‘flux’. A string which indicated on which lightcurves apply the sorting.
Returns:the lightcurve sorted in pyLIMA convention
Return type:array_like
clean_data_flux()[source]

Clean outliers of the telescope for the fits. Points are considered as outliers if they are 10 mag brighter or fainter than the lightcurve median or if nan appears in any columns or errobar higher than a 1 mag.

Returns:the cleaned magnitude lightcurve
Return type:array_like
clean_data_magnitude()[source]

Clean outliers of the telescope for the fits. Points are considered as outliers if they are 10 mag brighter or fainter than the lightcurve median or if nan appears in any columns or errobar higher than a 1 mag.

Returns:the cleaned magnitude lightcurve
Return type:array_like
compute_parallax(event, parallax)[source]

Compute and set the deltas_positions attribute due to the parallax.

Parameters:
  • event (object) – a event object. More details in the event module.
  • parallax (list) – a list containing the parallax model and to_par. More details in microlparallax module.
find_gamma(star)[source]

Set the associated \(\Gamma\) linear limb-darkening coefficient associated to the filter.

Parameters:star (object) – a stars object.
hidden()[source]
lightcurve_in_flux()[source]

Transform magnitude to flux using m=27.4-2.5*log10(flux) convention. Transform error bar accordingly. More details in microltoolbox module.

Returns:the lightcurve in flux, lightcurve_flux.
Return type:array_like
lightcurve_in_magnitude()[source]

Transform flux to magnitude using m = 27.4-2.5*log10(flux) convention. Transform error bar accordingly. More details in microltoolbox module.

Returns:the lightcurve in magnitude, lightcurve_magnitude.
Return type:array_like
n_data(choice='magnitude')[source]

Return the number of data points in the lightcurve.

Parameters:choice (string) – ‘magnitude’ (default) or ‘flux’ The unit you want to check data for.
Returns:the size of the corresponding lightcurve
Return type:int