Skip to content
Snippets Groups Projects
Commit 7ca15eb8 authored by Jocabed Martínez's avatar Jocabed Martínez
Browse files

modificacion

parent ad14cefc
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -118,13 +118,8 @@ def error1D(tpl,x, y):
Obtenemos los mejores parámetros para el ajuste.
```python
def error1D(tpl,x, y):
ymodel = gauss1D(tpl,x)
errors = (ymodel - y)
return errors
```
best,suss = leastsq(error1D, params0_1D, args = (x_1D, y_1D))
```
Vemos cuales son los mejores parámetros del ajuste.
```python
......@@ -139,7 +134,7 @@ ymodel_best = gauss1D(best, x_1D)
plt.plot(x_1D,ymodel_best,'red')
plt.plot(x_1D,y_1D,'.',color="black")
```
poner imagen aqui
![](./imagenes/imagen6.png)
Ahora, intentemos de hacer lo mismo para una banda o franja de la imagen mas gruesa.
......@@ -150,7 +145,7 @@ plt.imshow(star_1Dp_array, cmap = 'gray')
plt.show()
```
poner imagen aquiii
![](./imagenes/imagen7.png)
```python
yp = np.asarray(star_1Dp)
......@@ -171,7 +166,7 @@ Graficamos los datos.
plt.plot(xp, yp, '.',color="black")
plt.show()
```
poner imagen aquiiii
![](./imagenes/imagen8.png)
Ahora, graficamos los datos junto con el modelo.
```python
......
imagenes/imagen6.png

10.7 KiB

imagenes/imagen7.png

2.74 KiB

imagenes/imagen8.png

10.9 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment