```python
import sympy as sm
```

## Depth


```python
u1, u2, r, k, mu_b, d = sm.symbols("u1, u2, r, k, mu_b, d", real=True)
mu = sm.sqrt(1 - r ** 2)
ir = 1 - u1 * (1 - mu) - u2 * (1 - mu) ** 2
```


```python
f0 = sm.simplify(sm.integrate(2 * sm.pi * r * ir, (r, 0, 1)))
f0
```


```python
df = sm.pi * k ** 2 * ir.subs([(r, sm.sqrt(1 - mu_b ** 2))])
df
```


```python
delta = sm.simplify(df / f0)
delta
```


```python
sm.solve(sm.Eq(delta, d), k ** 2)[0]
```

## Duration


```python
# sin2phi = sin^2(pi * tau / P)

k, b, a, sin2phi, tau, P = sm.symbols("k, b, a, sin2phi, tau, P", real=True)

cos2i = (b / a) ** 2
sin2i = 1 - cos2i

val = sm.simplify(((1 + k) ** 2 - b ** 2) / (a ** 2 * sin2i))
val
```


```python
a2_res = sm.solve(sm.Eq(sin2phi, val), a ** 2)[0]
a2_res
```


```python
sm.simplify(a2_res.subs([(sin2phi, sm.sin(sm.pi * tau / P) ** 2)]))
```


```python
sm.simplify(a2_res - ((1 + k) ** 2 - b ** 2 * (1 - sin2phi)) / sin2phi)
```


```python
sm.simplify(sm.diff(a2_res.subs([(sin2phi, sm.sin(sm.pi * tau / P) ** 2)]), tau))
```


```python

```

b583295b11034c9e8ff0e953408a237c21ff534a
ipynb
Jupyter Notebook
paper/figures/depth-and-duration.ipynb
exoplanet-dev/tess.world
06ee11db96351d167451615a98b72ff84b5f7765
MIT
2020-09-08T10:43:48.000Z
2020-09-08T10:43:48.000Z
paper/figures/depth-and-duration.ipynb
exoplanet-dev/tess.world
06ee11db96351d167451615a98b72ff84b5f7765
MIT
paper/figures/depth-and-duration.ipynb
exoplanet-dev/tess.world
06ee11db96351d167451615a98b72ff84b5f7765
MIT
2020-09-08T10:43:59.000Z
2020-09-08T10:43:59.000Z
Qwen/Qwen-72B
1. YES
2. YES