Professional Documents
Culture Documents
Espectro MAGS 19052022
Espectro MAGS 19052022
POINTS 1) - 2) - 3)
First, we load the FITS data cube to extract the information of the header.
In [3]: hdul.info()
Filename: ESO113-G032.fits
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 1532 ()
1 DATA 1 CompImageHDU 76 (408, 327, 3681) float32
2 STAT 1 CompImageHDU 48 (408, 327, 3681) float32
1 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [5]: hdu.header
2 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
We can see that the values of the dimensions extracted from the FITS header coincide
with the dimensions and lengths of the data matrix, whose axes appear in the order: (z, y,
x)
In [6]: hdu.data.shape
In [7]: hdu.data
3 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
...,
POINT 4)
In this point, we will represent several images of the galaxy at different wavelengths
4 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Parameters
----------
arr: array created from the median of each of the data in the list of an image
Returns
-------
result: size, min, max, mean, median and std of the array
"""
5 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
6 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
POINT 5)
Now, we represent the spectrum of different points of the data cube. The points we
choose are those marked with a cross in the following image:
For the purple point, we define the x-axis and the y-axis as follows:
In [16]: espec175180.shape
Out[16]: (3681,)
7 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
8 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
9 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
POINT 6)
The next step is to plot a 'white' image (moment 0) of the data cube.
10 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
We want the distance in arcseconds to the center of the galaxy to appear on the x-axis
and on the y-axis.
To obtain the coordinates of the center of the galaxy, we consult the RA and Dec
coordinates of the galaxy in the NED catalog and transform them to coordinates in the
image using the information in the header and the WCS function of the astropy package.
In [27]: RA = 19.020583
Dec = -61.622167
In [28]: w = WCS(hdu.header)
w
In [29]: x = w.wcs_world2pix([[RA,Dec,0]], 0)
x
Out[30]: 207.34717446772342
Out[31]: 135.29745217887802
11 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
As you can see in the previous image, the center of the image has to be recalculated. To
do this, we use the function " centroid_com" from photutils
(22.810965082072382, 14.358467617381883)
12 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
13 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Out[38]: ([44.6, 34.6, 24.6, 14.6, 4.6, -5.4, -15.4, -25.4, -35.4],
[-28.8, -18.8, -8.8, 1.2, 11.2, 21.2, 31.2])
POINT 7)
In this part, we will plot an image r-band and i-band pf the galaxy in magnitudes
Out[40]: 200
14 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Out[41]: 2200
Out[43]: 1800
Out[44]: 3000
15 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
16 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
17 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
POINT 8)
From the previous point, we obtain an image of color r-i
18 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
If magnitude is big, signal is weaker and if the agnitude is small, signal is brighter. We
can observe in central zones: r-i > 0. It is mean that there are older stars or there are
more metallicity or dust. In external zones r-i < 0, so, there are youger stars.
POINT 9)
Now, we will obtain an image in Ha of the galaxy (decontaminated from the adjacent
continuum)
In [171… Ha = 6563
Out[173]: 6753.326999999999
Out[60]: 1553
Out[61]: 1653
19 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
20 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [68]: plt.figure("imHa",figsize=(8,6))
plt.imshow(imHa, origin='lower', vmin=0, vmax=1000)
plt.scatter(pixxHa, pixyHa, color='red', marker='X', linewidths=0.1)
plt.title("GALAXY IMAGE Ha")
plt.colorbar(label="Counts")
plt.xlabel("Pixel")
plt.ylabel("Pixel")
plt.show()
Using this map, we are going to represent the spectrum of some area of the galaxy rich
in ionized gas in ordet to identify different emission lines.
21 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
POINT 10)
In this last point of the first part of the practice, we will represent the spectrum of the
center of the galaxy, we will identify some emission or absorption line and from this we
will obtain the redshift of the galaxy.
22 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=92.70216202, mean=6753.77333039, stddev=2.
23 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
1839786)>
In [80]: plt.figure(figsize=(8,5))
plt.plot(XHacent[1578:1630], YHacent[1578:1630], '-')
plt.plot(XHacent[1578:1630], g(XHacent[1578:1630]), label='Gaussian')
plt.xlabel('Position')
plt.ylabel('Flux')
plt.legend(loc=2)
Out[82]: 0.029068007068307145
Out[83]: 0.23395848276537398
Using another galaxy point of the external part of the galaxy, we will see that the redshift
increases due to the speed of rotation of the galaxy
24 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
25 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=852.29121513, mean=6750.37799031, stddev=
1.22018373)>
In [90]: plt.figure(figsize=(8,5))
plt.plot(XHaext[1590:1614], YHaext[1590:1614], '-')
plt.plot(XHaext[1590:1614], u(XHaext[1590:1614]), label='Gaussian')
plt.xlabel('Position')
plt.ylabel('Flux')
plt.legend(loc=2)
26 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Out[91]: 0.028550661330840832
Out[92]: 1.5738292852564766
POINTS 1) - 2)
We are going to generate images of the galaxy around the line of Ha
27 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [94]: intervalo = []
for inter in interv:
interr = int(round((inter - crval3) / cdelt3, 0))
intervalo.append(interr)
In [95]: filename = []
for num in intervalo:
imlon = hdu.data[num, :, :]
plt.figure("GIF", figsize=(4,4))
plt.imshow(imlon, origin='lower', vmin=0, vmax=500)
plt.colorbar(label="10^(-20)*erg/s/cm^2/Å")
plt.title("IMAGEN INTERVALO "+str(num), loc='center')
plt.savefig(str(num)+'.png')
filename.append(str(num)+'.png')
plt.show()
28 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
29 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
30 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
31 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
32 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
33 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
34 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
35 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
36 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
37 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
38 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
39 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
40 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
41 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
42 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
43 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
44 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
45 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
46 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
47 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
48 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
49 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
50 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
51 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
52 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
POINT 3)
At this point we are going to compare the rotation curve obtained from the rotation
speeds of different points of the major axis of the galaxy and the rotation curve obtained
from a mass profile
From the equation of the line that represents the major axis of the galaxy, we plot it and
we choose the points where we will measure the displacement spectrum of the line Ha.
In [98]: rx = np.linspace(-0,400,50)
ry = -0.67*rx + 293.64
In [99]: ptsx1 = [50, 75, 90, 110, 130, 150, 170, 180, 190, 200, 210, 220, 230, 240
ptsx = np.array(ptsx1)
53 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [100… ptsy = []
for num in ptsx:
ptsy.append(-0.67*num + 293.64)
54 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [103… k= 0
for numx, numy in zip(ptsx,ptsy):
especptsnum = hdu.data[:, int(round(numy,0)), int(round(numx,0))]
Xnum = ejex*cdelt3 + crval3
Ynum = especptsnum
print(k)
plt.figure("ptsnum", figsize=(10,6))
plt.plot(Xnum[1595:1610], Ynum[1595:1610], linewidth=0.5)
plt.show()
k += 1
55 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
56 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
57 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
58 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
59 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
10
11
60 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
12
13
61 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
14
15
62 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
16
17
63 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
18
19
64 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Of the spectra represented above, we keep those that show an emission and an easily
identifiable Ha line and we fit the line with a Gaussian. In addition, we will save the
information of the observed wavelength for Ha.
In [104… k = 0
lista = [0, 5, 8, 12, 13, 14, 15, 17, 18, 19]
picoiz = []
xpicos = []
ypicos = []
65 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
24.72435
[6748.56054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=17.83978537, mean=6748.57846318, stddev=1.
54187858)>
2
50.00301
[6748.56054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=46.05024937, mean=6747.9778068, stddev=0.9
647453)>
66 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
3
155.55742
[6747.31054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=153.08522735, mean=6747.82437212, stddev=
1.07312454)>
4
69.00148
[6748.56054688]
67 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=56.50158104, mean=6747.97712602, stddev=1.
16179561)>
6
95.6998
[6748.56054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=56.9686582, mean=6747.93435168, stddev=1.0
4282218)>
68 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
7
71.04692
[6747.31054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=13.11105874, mean=6748.51348042, stddev=1.
70207595)>
9
111.501816
[6748.56054688]
69 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
10
207.97047
[6751.06054688]
WARNING: The fit may be unsuccessful; check fit_info['message'] for more
information. [astropy.modeling.fitting]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=57.02605901, mean=6752.36053354, stddev=2.
41665208)>
70 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
11
855.7881
[6752.31054688]
WARNING: The fit may be unsuccessful; check fit_info['message'] for more
information. [astropy.modeling.fitting]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=1084.60741999, mean=6755.88258424, stddev=
6.43488368)>
16
71 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
45.271843
[6747.31054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=5.81390095, mean=6747.39186347, stddev=0.6
3452087)>
In [105… picoiz
Out[105]: [6748.578463184343,
6747.977806795217,
6747.824372119792,
6747.977126016808,
6747.934351676839,
6748.5134804226645,
6749.103701559097,
6752.360533536425,
6755.882584236349,
6747.391863473442]
72 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [106… k = 0
lista1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16]
picodrch = []
k +=1
12
307.05502
[6757.31054688]
WARNING: The fit may be unsuccessful; check fit_info['message'] for more
information. [astropy.modeling.fitting]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=42.27673651, mean=6756.72577737, stddev=1.
87786961)>
73 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
13
151.3778
[6757.31054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=37.29772175, mean=6756.79097317, stddev=2.
22543042)>
14
89.37853
[6759.81054688]
74 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=250.3070151, mean=6762.61259878, stddev=6.
2819277)>
17
68.876884
[6758.56054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=50.01911535, mean=6758.82547672, stddev=1.
21072994)>
75 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
18
60.633434
[6758.56054688]
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=44.87934753, mean=6758.58640875, stddev=1.
26902184)>
19
48.678207
[6758.56054688]
76 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Model: CompoundModel
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=45.63633972, mean=6759.15444847, stddev=0.
95887503)>
In [107… picodrch
Out[107]: [6756.725777368589,
6756.790973170733,
6762.612598781777,
6758.825476715385,
6758.586408752306,
6759.154448474017]
Out[108]: [6748.578463184343,
6747.977806795217,
6747.824372119792,
6747.977126016808,
6747.934351676839,
6748.5134804226645,
6749.103701559097,
6752.360533536425,
6755.882584236349,
6747.391863473442,
6756.725777368589,
6756.790973170733,
6762.612598781777,
6758.825476715385,
77 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
6758.586408752306,
6759.154448474017]
We calculate the distance between the position of the points whose spectrum has been
adjusted by a gaussian and the galaxy center
In [109… distcentpix = []
for nx, ny in zip(xpicos, ypicos):
distancia = np.abs(((nx - pixxcent)**2 + (ny - pixycent)**2))**0.5
distcentpix.append(distancia)
distcentpix
Out[109]: [177.91943627536358,
159.86389695985258,
135.78984453946956,
111.71579211962937,
63.56768728404489,
51.53066107739732,
27.45660867508097,
15.419582496552911,
3.3825565478600317,
68.83960106935753,
8.654470129992974,
20.691496264465997,
32.72852245509839,
92.91365348672512,
116.98770590585221,
153.0987845360262]
In [110… distcentarcsec = []
for valor in distcentpix:
arcsec = valor * cd2_2 * 3600
distcentarcsec.append(arcsec)
distcentarcsec
Out[110]: [35.58388725507274,
31.97277939197054,
27.15796890789393,
22.34315842392589,
12.713537456808988,
10.30613221547947,
5.491321735016199,
3.0839164993105848,
0.6765113095720068,
13.767920213871516,
1.7308940259985963,
4.138299252893202,
6.545704491019683,
18.582730697345042,
23.39754118117046,
30.619756907205257]
In [111… distcentrad = []
for num in distcentarcsec:
radianes = num * 4.848e-6
distcentrad.append(radianes)
distcentrad
78 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
Out[111]: [0.00017251068541259264,
0.00015500403449227317,
0.00013166183326546977,
0.00010831963203919272,
6.163522959060997e-05,
4.9964128980644475e-05,
2.6621927771358533e-05,
1.4950827188657715e-05,
3.2797268288050888e-06,
6.674687719684911e-05,
8.391374238041194e-06,
2.0062474778026246e-05,
3.173357537246342e-05,
9.008907842072876e-05,
0.0001134312796463144,
0.0001484445814861311]
And now, we transform to km, taking into acount that the distance to the galaxy is
3.932e+21 km
In [112… distcentkm = []
for valor in distcentrad:
kilom = valor * 3.93e+21
distcentkm.append(kilom)
len(distcentkm), distcentkm
Out[112]: (16,
[6.77966993671489e+17,
6.091658555546336e+17,
5.174310047332962e+17,
4.256961539140274e+17,
2.4222645229109718e+17,
1.963590268939328e+17,
1.0462417614143904e+17,
5.8756750851424824e+16,
1.2889326437203998e+16,
2.62315227383617e+17,
3.2978100755501892e+16,
7.884552587764315e+16,
1.2471295121378125e+17,
3.54050078193464e+17,
4.4578492901001555e+17,
5.833872052404952e+17])
In [113… velobs = []
for pico in picos:
longreposo = np.abs((Haobs - pico)/Haobs)
velobs.append(longreposo * 3e+5)
velobs
Out[113]: [230.75399265689452,
257.434917219019,
264.25042617608693,
257.46515713269923,
259.36517677551643,
233.64050180514985,
207.4231071328851,
62.75588994899829,
93.6922403462714,
283.46229301818335,
131.14655326103656,
134.04252558443787,
392.6368843045594,
79 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
224.41438640025228,
213.79507991554044,
239.0271847222778]
In [116… velR = []
for vobs in velobs:
vr = vobs/np.sin(71 * np.pi / 180)
velR.append(vr)
len(velR), velR
Out[116]: (15,
[244.05019490032882,
272.26849251041307,
279.47671573622114,
272.30047486851856,
274.30997493742296,
247.10302667195816,
219.37496785973772,
66.37192707633531,
99.09085105692884,
299.79558343262676,
138.70330699522148,
141.76614721659493,
237.34529621272355,
226.1140980546326,
252.80009392810763])
80 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
81 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
The last step is to use the information from the mass profile provided to derive the
rotation curve that would be obtained based on the existing visible matter.
Out[153]: (10,
[9.5e+16,
1.62e+17,
2.26e+17,
2.9e+17,
3.54e+17,
4.21e+17,
4.85e+17,
5.48e+17,
6.13e+17,
6.8e+17])
Out[154]: (10,
[7.51e+40,
1.22e+41,
1.66e+41,
2.07e+41,
2.45e+41,
2.75e+41,
3.05e+41,
3.32e+41,
3.52e+41,
3.65e+41])
82 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [147… G = 6.67e-17
In [155… pmvel = []
for dist, masa in zip(pmdist, pmmasa):
masvel = (G * masa / dist*1000)**0.5/1000
pmvel.append(masvel)
len(pmvel), pmvel
Out[155]: (10,
[229.626011730287,
224.12243126811487,
221.34144527907577,
218.1971585516182,
214.8544376514739,
208.73160663984575,
204.8056659976532,
201.02111593336383,
195.70594181241702,
189.21470841970225])
In [156… pmvel.insert(0, 0)
len(pmvel), pmvel
Out[156]: (11,
[0,
229.626011730287,
224.12243126811487,
221.34144527907577,
218.1971585516182,
214.8544376514739,
208.73160663984575,
204.8056659976532,
201.02111593336383,
195.70594181241702,
189.21470841970225])
In [157… pmdist.insert(0, 0)
len(pmdist), pmdist
Out[157]: (11,
[0,
9.5e+16,
1.62e+17,
2.26e+17,
2.9e+17,
3.54e+17,
4.21e+17,
4.85e+17,
5.48e+17,
6.13e+17,
6.8e+17])
83 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
In [170… plt.figure("Comparison",figsize=(10,8))
plt.plot(pmdist, pmvel, color='orange', label='Visible Mass Curve')
plt.plot(xajust, yajust(xajust), color='red', label='Fitted V(R) Curve')
plt.scatter(distcentkm, velR, color='black', marker='X', s=70, linewidths
plt.title("V mass profile and V(R)")
plt.xlabel("Distance in Km")
plt.ylabel("V (km/s)")
plt.legend(loc=5)
plt.show()
84 of 85 5/19/22, 10:37
Espectro_MAGS_03052022 about:srcdoc
The difference between both curves is that the curve obtained from the mass profile does
not take into account the existence of dark matter, only the visible matter.
In [ ]:
85 of 85 5/19/22, 10:37