FSPL User Class
FSPL_parallax
- class model.FSPL_PhotAstrom_Par_Param1(*args, **kwargs)
Bases:
ModelClassABC
,FSPL_PhotAstrom
,FSPL_Parallax
,FSPL_PhotAstromParam1
Helper class that provides a standard way to create an ABC using inheritance.
Methods
animate
(tE, time_steps, frame_time, name, ...)Produces animation of microlensing event.
Parallax: Get piE_ecliptic
Parallax: Get the photometric amplification term at a set of times, t.
get_astrometry
(t_obs[, ast_filt_idx])Parallax: Get astrometry
Outputs position of source unlensed.
get_centroid_shift
(t[, ast_filt_idx])Parallax: Get the centroid shift (in mas) for a list of observation times (in MJD).
get_geoproj_ast_params
(t0par)get_geoproj_params
(t0par)get_lens_astrometry
(t_obs)Parallax: Get lens astrometry
get_photometry
(t_obs[, filt_idx, amp_arr, ...])Get the photometry for each of the lensed source images.
Parallax: Get the photometric amplification term at a set of times, t for both the plus and minus images.
get_source_outline_astrometry
(r, n, center)Return astrometric points that outline the outer circumference of the source star.
get_chi2_astrometry
get_chi2_photometry
get_lnL_constant
get_resolved_astrometry
log_likely_astrometry
log_likely_astrometry_each
log_likely_photometry
log_likely_photometry_each
start
- animate(tE, time_steps, frame_time, name, size, zoom, astrometry)
Produces animation of microlensing event. This function takes the PSPL and makes an animation, the input variables are as follows
- Parameters
- tE:
- number of einstein crossings times before/after the peak you want the animation to plot
e.g tE = 2 => graph will go from -2 tE to 2 tE
- time_steps:
number of time steps before/after peak, so total number of time steps will be 2 times this value
- frame_time:
times in ms of each frame in the animation
- name: string
the animation will be saved as name.html
- size: list
[horizontal, vertical] cm’s
- zoom:
# of einstein radii plotted in vertical direction
- calc_piE_ecliptic()
Parallax: Get piE_ecliptic
- get_amplification(t)
Parallax: Get the photometric amplification term at a set of times, t.
- Parameters
- t:
Array of times in MJD.DDD
- get_astrometry(t_obs, ast_filt_idx=0)
Parallax: Get astrometry
- get_astrometry_unlensed(t)
Outputs position of source unlensed.
Input a list of times and it will output the position of the source had it not been lensed at each of the times in the list
e.g ifn = 4
, and sayv = [1,0]
& the times are[0,1,2]
in years.This will return((( (1,0),(0,1),(-1,0),(0,-1) ), ( (2,0),(1,1),(0,0),(1,-1) ), ( (3,0),(2,1),(1,0),(2,-1) ))...
= (positions at t=0), (positions at t=1), (positions at t=2)so
np.array(positions)
is an array which contains an array for each time step with the positions of all the points on the boundary of the source.
- get_centroid_shift(t, ast_filt_idx=0)
Parallax: Get the centroid shift (in mas) for a list of observation times (in MJD).
- get_lens_astrometry(t_obs)
Parallax: Get lens astrometry
- get_photometry(t_obs, filt_idx=0, amp_arr=None, print_warning=True)
Get the photometry for each of the lensed source images.
- Parameters
- t_obsarray_like
Array of times to model.
- Other Parameters
- ———-
- amp_arrarray_like
Amplifications of each individual image at each time, i.e. amp_arr.shape = (len(t_obs), number of images at each t_obs).
This will over-ride t_obs; but is more efficient when calculating both photometry and astrometry. If None, then just use t_obs.
- Returns
- mag_modelarray_like
Magnitude of the centroid at t_obs.
- get_resolved_amplification(t)
Parallax: Get the photometric amplification term at a set of times, t for both the plus and minus images.
- Parameters
- t:
Array of times in MJD.DDD
- get_resolved_astrometry(t)
Parallax: Get the x, y astrometry for each of the two source images, which we label plus and minus.
- Returns
- [xS_plus, xS_minus]list of numpy arrays
xS_plus is the vector position of the plus image.
xS_minus is the vector position of the plus image.
- get_source_outline_astrometry(r, n, center)
Return astrometric points that outline the outer circumference of the source star.
The outline is described as a circle of radius self.radius and is evaluated at self.n_outline number of points.takes in the radius of the circle, centre position and number of points we are approximating the circle by and returns a numpy array of positionse.g:( ((1,0), (0,1), (-1,0), (0,-1)) )
if n = 4 and radius = 1- Returns
- source_pointsnumpy array
Returns an array of
shape = [2, self.n_outline, len(time)]