```python
import numpy as np
import cmath as cm
import matplotlib as mpl
from matplotlib import pyplot as plt
import scipy.integrate as integrate
from scipy.integrate import quad
import scipy.optimize as so
import scipy.special as ss
import sympy as sym
import math

h = 4.9                                                     #radial scalelength in kpc
z0 = .99                                                    #half-thickness in kpc 
L0 = 5.0e9                                                  #units? value?

x = np.linspace(10, 50, 200)


Lrz = lambda r,z: L0*np.exp(-r/h)*(math.cosh(z/z0))**-2     #cosh in radians?

y = np.zeros(np.shape(x))
hr = lambda r: Lrz(r,z)
for r,z in enumerate(x):
    y[r] = quad(hr, 1, r)[0]
```


```python
#Take sqrt only if there will be a real result.
for i,j in enumerate(y):
    if j >= 0:
        v[i] = np.sqrt(j)
#v = np.sqrt(y)

fig = plt.figure(figsize=(9.0,8.0))                 #size of the plot
ax3 = plt.axes()
ax3.grid(True)
ax3.yaxis.grid(True,which='minor',linestyle='--')


 #functions
plt.plot(x, v, linestyle='-.', label='Velocity(r)')          

plt.axis('tight');                                 #xmin, xmax, ymin, ymax
                                                   #or use: plt.xlim(10, 0) plt.ylim(1.2, -1.2);
                                                   #or to tighten the bounds: plt.axis('tight')
                                                   #or use: plt.axis('tight')
                                                   #plt.axis([0, 15000, 0.5e6, 2.5e6])
 #labeling plots
ax3.set_title('Luminosity Profile for Disk', fontsize=25)              #labeling axes
ax3.set_xlabel('Radius (kpc)', fontsize=14)
ax3.set_ylabel('Luminosity ($L_\odot$)', fontsize=25)

#plt.legend(fontsize=14);                                   #adding legend
#plt.savefig('Luminosity Profile for Disk.png')
```


```python

```

06bd98d8d79b4f1ca1b1c719f8b1d06de6ff67c1
ipynb
Jupyter Notebook
binder/testing/Altering/Disk/Disk Luminosity profile.ipynb
villano-lab/galactic-spin
16b67b319008a4bb91ef3b2e80828e98cf13173b
MIT
2020-04-04T23:05:15.000Z
2021-10-01T15:42:53.000Z
binder/testing/Altering/Disk/Disk Luminosity profile.ipynb
villano-lab/galactic-spin
16b67b319008a4bb91ef3b2e80828e98cf13173b
MIT
2021-11-12T18:51:21.000Z
2022-01-14T19:39:59.000Z
binder/testing/Altering/Disk/Disk Luminosity profile.ipynb
villano-lab/galactic-spin
16b67b319008a4bb91ef3b2e80828e98cf13173b
MIT
Qwen/Qwen-72B
1. YES
2. YES