Skip to content

Commit

Permalink
Added Brightness_calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Farrmol committed Jul 29, 2024
1 parent 48008b6 commit 9b9055e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions orbitize/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,22 @@ def compute_all_orbits(self, params_arr, epochs=None, comp_rebound=False):

tanom, eanom = kepler.times2trueanom_and_eccanom(sma, epochs, mtot, ecc, tau, tau_ref_epoch=58849, tolerance=1e-9, max_iter=100, use_c=True, use_gpu=False,)

def brightness_calculation(sma, tanom, ecc = 0.75, inc = np.radians(30), aop = np.radians(120), plx = np.radians(65)):

R = (sma*(1-ecc**2))/(1+ecc*np.cos(tanom))

z = (R)*(-np.cos(aop)*np.sin(inc)*np.sin(tanom)-np.cos(tanom)*np.sin(inc)*np.sin(aop))

#ro = (z**2+((raoff**2+decoff**2)/plx**2))**0.5

B = math.arctan2(-R, z)+ math.pi

Alpha = (1/math.pi)*(np.sin(B)+(math.pi-B)*np.cos(B))

Albedo = 0.5
brightness = Albedo*Alpha/R**2

return brightness


# raoff, decoff, vz are scalers if the length of epochs is 1
Expand Down

0 comments on commit 9b9055e

Please sign in to comment.