--
LucaFruzza - 24 Oct 2013
Preliminary Course Tools Coding:
1) Signal measuring
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import pyfits
import numpy
def Gaf(x):
f = pyfits.open(x)i = f[0]d = i.dataplt.imshow(d)plt.show(d)
def Signal(x,x1,x2,y1,y2,xx1,xx2,yy1,yy2):
f = pyfits.open(x)
i = f[0]
d = i.data
u = d[x1:x2,y1:y2].sum()-(((x2-x1)*(y2-y1))/((xx2-xx1)*(yy2-yy1)))*(d[xx1:xx2,yy1:yy2].sum())
print u
2)