FSPL(Finite-Source Point Lens) Models - NOT DONE YET… place holders
FSPL Classes
- class model.FSPL_PhotAstrom
Bases:
FSPL,PSPL_PhotAstromContains methods for model a PSPL photometry + astrometry. This is a Data-type class in our hierarchy. It is abstract and should not be instantiated.
- Attributes:
- Available class variables that should be defined.
- t0
- tE
- u0_amp
- u0_E
- u0_N
- beta
- piE_E - valid only if parallax model
- piE_N - valid only if parallax model
- piE_amp
- mL
- thetaE_amp
- thetaE_E
- thetaE_N
- xS0_E
- xS0_N
- xL0_E
- xL0_N
- muS_E
- muS_N
- muL_E
- muL_N
- muRel_E
- muRel_N
- muRel_amp
- piS
- piL
- dL
- dS
- dL_dS (dL over dS)
- radius
- n
- b_sff[#]
- mag_src[#] – add in
- mag_base[#] – add in
- raL - if parallax model
- decL - if parallax model
Methods
animate(crossings, time_steps, frame_time, ...)Produces animation of microlensing event.
get_all_arrays(t_obs)Obtain the image and amplitude arrays for each t_obs.
get_astrometry(t_obs[, image_arr, amp_arr, ...])Position of the observed (unresolved) source position in arcsec.
Get the astrometry of the source outline if the lens didn't exist.
get_chi2_astrometry(t_obs, x_obs, y_obs, ...)Get the chi^2 value for this model given input astrometry data and uncertainties for the specified astrometric data set.
get_chi2_photometry(t_obs, mag_obs, mag_err_obs)Get chi^2 values for the model and input photometric data in the specified photometric filter or data set.
get_lnL_constant(err_obs)Get the natural log of the constant normalization terms of the likelihood.
get_photometry(t_obs[, filt_idx, amp_arr, ...])Get the photometry for the combined source images.
get_resolved_amplification(t_obs[, ...])Get the photometric amplification term at a set of times, t for both the plus and minus images.
get_resolved_astrometry(t_obs[, image_arr, ...])Position of the observed (lensed) source position on the sky.
Get the x, y astrometry for each of the two lensed source images and all the associated outline points.
get_resolved_photometry(t_obs[, filt_idx, ...])Get the photometry for each of the lensed source images.
get_source_outline_astrometry(center)Return astrometric points that outline the outer circumference of the source star.
get_u(t_obs)Get the separation vector,
get_u_outline(t_obs)Get the separation vector,
log_likely_astrometry(t_obs, x_obs, y_obs, ...)Get the summed natural log of the likelihood for the input astrometric data in the specified filter or data sets.
log_likely_astrometry_each(t_obs, x_obs, ...)Get the natural log of the likelihood for the input astrometric data in the specified filter or data sets.
log_likely_photometry(t_obs, mag_obs, ...[, ...])Get the summed natural log of the likelihood for the input photometric data for the specified filter or data set.
log_likely_photometry_each(t_obs, mag_obs, ...)Get the natural log of the likelihood for the input photometric data in the specified filter or data sets.
- animate(crossings, 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
- get_all_arrays(t_obs)
Obtain the image and amplitude arrays for each t_obs. These arrays contain the positions for each point in the outline for each lensed image.
- Parameters:
- t_obsarray_like
Array of times to model.
- Returns:
- imagesarray_like
Array/tuple of positions of each lensed image at each t_obs. Shape = [len(t_obs), n_images=2, [E,N]] The last axis contains East and North positions on the sky in arcseconds.
- amp_arrarray_like
Array/tuple of amplification of each lensed image at each t_obs. Shape = [len(t_obs), n_images=2]
Notes
The algorithm uses green’s theorem to change an area integral of the image of the source into a path integral around the outside outline. We perform a first-order contour integral to approximate the area.
- get_astrometry(t_obs, image_arr=None, amp_arr=None, ast_filt_idx=0)
Position of the observed (unresolved) source position in arcsec.
- Parameters:
- t_obsarray_like
Array of times to model.
- Returns:
- model_posarray_like
Array of vector positions of the centroid at each t_obs.
- Other Parameters:
- image_arrarray_like
Array of complex image positions at each t_obs, i.e. image_arr.shape = (len(t_obs), number of images at each t_obs). Each value in this array is complex (real = north component, imaginary = east component)
- amp_arrarray_like
Array of magnifications of each images. Same shape as image_arr.
- get_astrometry_outline_unlensed(t_obs)
Get the astrometry of the source outline if the lens didn’t exist.
- get_photometry(t_obs, filt_idx=0, amp_arr=None, print_warning=True)
Get the photometry for the combined source images.
- Parameters:
- t_obsarray_like
Array of times to model.
- Returns:
- mag_modelarray_like
Magnitude of the centroid at t_obs.
- 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.
- get_resolved_amplification(t_obs, filt_idx=0, amp_arr=None)
Get the photometric amplification term at a set of times, t for both the plus and minus images.
- get_resolved_astrometry(t_obs, image_arr=None, amp_arr=None)
Position of the observed (lensed) source position on the sky.
- Parameters:
- t_obsarray_like, shape = [N_times]
Array of times to model.
- Returns:
- model_posarray_like. shape = [N_times, N_images=2, 2]
Array of vector positions of the centroid at each t_obs. Last axis contains East/North positions.
- Other Parameters:
- image_arrarray_like
Array of complex image positions at each t_obs, i.e. image_arr.shape = (len(t_obs), number of images at each t_obs, [E,N]).
- amp_arrarray_like
Array of magnifications of each images. Same shape as image_arr.
- get_resolved_astrometry_outline(t_obs)
Get the x, y astrometry for each of the two lensed source images and all the associated outline points. The two lensed source images are labeled plus and minus.
These are actual positions on the sky.
- 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. Each shape = [len(t_obs), self.n_outline, 2] where the last axis contains East and North positions.
- get_resolved_photometry(t_obs, filt_idx=0, amp_arr=None)
Get the photometry for each of the lensed source images. Implement with no blending (since we don’t support different blendings for the different images).
- Parameters:
- t_obsarray_like
Array of times to model.
- Returns:
- mag_modelarray_like
Magnitude of each lensed image centroid at t_obs. Shape = [2, len(t_obs)]
- Other Parameters:
- amp_arrarray_like
Amplifications of each individual image and each outline point for that image at each time, i.e. amp_arr.shape = (len(t_obs), self.n_outline, 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.
- filt_idxint
The filter index (def=0).
- get_u(t_obs)
Get the separation vector,
- ec{u}(t), which is the unlensed
source - lens separation vector on the plane of the sky in units of heta_E.
- get_u_outline(t_obs)
Get the separation vector,
- ec{u}(t), which is the unlensed
source - lens separation vector for each point of the source outline. Positions are on the plane of the sky in units of heta_E.