-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
189 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
double **generate_planet(int n_layers); | ||
void map_model(double **planet,int n_layers,double xi, double T_n, double delta_T,double lambda0, double phi0, double u1, double u2); | ||
void map_model(double **planet,int n_layers,double lambda0, double phi0, double u1, double u2,int brightness_model,double *brightness_params); | ||
double zhang_2016(double lat, double lon, double zeta, double T_n, double delta_T); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
double *lightcurve(int n_layers, int n_points, double *t, double tc, double per, double a, double inc, double ecc, double omega, double r_s, double r2,double xi,double T_n,double delta_T,double u1, double u2,double T_s); | ||
double *lightcurve(int n_layers, int n_points, double *t, double tc, double per, double a, double inc, double ecc, double omega, double r_s, double r2,double u1, double u2,int brightness_model,double* brightness_params); | ||
double *call_blocked(int n_layers, int n_points, double *x2, double *y2, double r2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,64 @@ | ||
class ModelParams(object): | ||
def __init__(self): | ||
self.t0= None | ||
self.per= None | ||
self.a_abs= None | ||
self.inc= None | ||
self.ecc= None | ||
self.w= None | ||
self.a= None | ||
self.rp= None | ||
self.xi= None | ||
self.T_n= None | ||
self.delta_T= None | ||
self.p_u1= None | ||
self.p_u2= None | ||
self.T_s= None | ||
|
||
def __init__(self,brightness_model='xi'): | ||
|
||
self.n_layers = 5 # The default resolution for the grid | ||
|
||
self.t0= None # The time of central **PRIMARY** transit [jd] | ||
self.per= None # Orbital period of the planet [days] | ||
self.a_abs= None # Absolute value of the semi major axis [AU] | ||
self.inc= None # Inclination of the planetary orbit (90 is face on) [degrees] | ||
self.ecc= None # Eccentricity | ||
self.w= None # Longitude of periastron [degrees] | ||
self.a= None # Semi major axis, scaled by stellar radius [-] | ||
self.rp= None # Planet radius as a fraction of stellar radius [-] | ||
self.p_u1= None # **PLANETARY** limb darkening coefficients [-] | ||
self.p_u2= None # **PLANETARY** limb darkening coefficients [-] | ||
|
||
if brightness_model == 'uniform brightness': | ||
self.n_layers = 1 # The default resolution for the grid | ||
|
||
self.brightness_type= 0 # Integer model identifier | ||
self.pb= None # Relative planet brightness (Star is 1) | ||
|
||
elif brightness_model == 'uniform temperature': | ||
self.n_layers = 1 # The default resolution for the grid | ||
|
||
self.brightness_type= 1 # Integer model identifier | ||
self.pb= None # Relative planet brightness (Star is 1) | ||
self.T_s= None # **STELLAR** effective temperature | ||
|
||
elif brightness_model == 'two brightness': | ||
self.brightness_type= 2 # Integer model identifier | ||
self.pb_d= None # Relative planet brightness (Star is 1) | ||
self.pb_n= None # Relative planet brightness (Star is 1) | ||
|
||
elif brightness_model == 'two temperature': | ||
self.brightness_type= 3 # Integer model identifier | ||
self.pb_d= None # Relative planet brightness (Star is 1) | ||
self.pb_n= None # Relative planet brightness (Star is 1) | ||
self.T_s= None # **STELLAR** effective temperature | ||
|
||
elif brightness_model == 'xi': | ||
self.brightness_type= 4 # Integer model identifier | ||
self.xi= None # Ratio between radiative and advective timescales | ||
self.T_n= None # Radiative solution temperature on night side | ||
self.delta_T= None # Day/Night side difference between radiative-only temperature | ||
self.T_s= None # **STELLAR** effective temperature | ||
|
||
else: | ||
print('Brightness model "'+str(brightness_model)+'" not recognised!') | ||
quit() | ||
|
||
def format_bright_params(self): | ||
if (self.brightness_type == 0): | ||
brightness_params = [self.pb] | ||
if (self.brightness_type == 1): | ||
brightness_params = [self.T_s,self.pb] | ||
if (self.brightness_type == 2): | ||
brightness_params = [self.pb_d,self.pb_n] | ||
if (self.brightness_type == 3): | ||
brightness_params = [self.T_s,self.pb_d,self.pb_n] | ||
if (self.brightness_type == 4): | ||
brightness_params = [self.T_s,self.xi,self.T_n,self.delta_T] | ||
return brightness_params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters