;+ ; NAME: ; EVILMC_plphs ; ; PURPOSE: ; Calls routines to calculate stellar ellipsoidal variation and planetary phase function. ; Code is provided with no warranties whatsoever at ; http://www.lpl.arizona.edu/~bjackson/code/idl.html. See also paper Jackson et al. (2012) ; ApJ 750, 1 for more details. ; ; CATEGORY: ; Astrophysics. ; ; CALLING SEQUENCE: ; Result = EVILMC_plphs(phs, params) ; ; INPUTS: ; phs: orbital phase; phs = 0 corresponds to inferior conjunction (i.e. mid-transit) ; that positional parameters are shown with Initial Caps. ; params: array of ellipsoidal variation parameters, as follows -- ; params[0] - # of lat/long grid points on star, ; params[1] - mass ratio, q (= M_p/M_*) ; params[2] - K_z, stellar reflex velocity, in m/s ; params[3] - T_0, stellar effective temp in K ; params[4:6] - x, y, z of stellar rotation vector in units of mean motion ; params[7:8] - \gamma_i, stellar quadratic limb-darkening coefficients ; params[9] - \beta, stellar gravity darkening exponent ; params[10] - a, semi-major axis (in units of stellar radii) ; params[11] - orbital period (in days) ; params[12] - orbital inclination in degrees ; params[13] - eccentricity (assumed 0 for now) ; params[14] - longitude of ascending node (should probably be 0) ; params[15] - longitude of pericenter (while ecc = 0, this is assumed 0) ; params[16] - F_0, planetary phase function parameter ; params[17] - F_1, planetary phase function parameter ; ; OUTPUTS: ; Normalized stellar ellipsoidal variation plus planetary phase function ; ; RESTRICTIONS: ; No checking of parameters is done, so be sure everything is in the correct units, etc. ; Also, the code requires a few companion routines: EVILMC.pro. ; These are available at http://www.lpl.arizona.edu/~bjackson/code/idl.html. ; ; EXAMPLE: ; ; See the companion code example_EVILMC.pro to see how to use this code. ; ; MODIFICATION HISTORY: ; Written by: Brian Jackson, 2012 April 18. ;- function EVILMC_plphs, phs, params EV_params = params[0:15] pl_params = params[16:n_elements(params)-1] pl_phs = pl_phs_crv(phs, pl_params[0], pl_params[1]) st_phs = EVILMC(phs, EV_params) ;calculate the normalization norm_st_phs = EVILMC(0.5, EV_params) ;normalize st_phs /= replicate(norm_st_phs, n_elements(phs)) ret = st_phs + pl_phs return, ret end;function