Skip to content
Snippets Groups Projects
Commit 592657ae authored by Juan Manuel Moreno Perez's avatar Juan Manuel Moreno Perez
Browse files

Imagen hasta el FWHM

parent 08354e01
Branches master
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
import numpy as np
from PIL import Image
```
%% Cell type:code id: tags:
``` python
img=Image.open('data/zapatocaImage.jpeg')
```
%% Cell type:code id: tags:
``` python
def fwhm(img):
std=img.std()
img=np.exp(-((img-39)**2)/(2*std**2))/(std*np.sqrt(2.0))
return img
```
%% Cell type:code id: tags:
``` python
r=0.2990
g=0.5870
b=0.1140
ar=np.asarray(img)
ar=(r*ar[:,:,0]+g*ar[:,:,1]+b*ar[:,:,2])/3
ar=ar.astype('uint8')
```
%% Cell type:code id: tags:
``` python
star1=ar[540:570,650:680]
star2=ar[305:325,620:635]
star3=ar[100:200,350:450]
```
%% Cell type:code id: tags:
``` python
star1filtered=fwhm(star1).astype('uint8')
star2filtered=fwhm(star2).astype('uint8')
star3filtered=fwhm(star3).astype('uint8')
```
%% Cell type:code id: tags:
``` python
```
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