Difference: LucaFruzzaPreliminarycoding ( vs. 1)

Revision 124 Oct 2013 - LucaFruzza

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="Public.LucaFruzza"
-- 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.data
plt.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)

META FILEATTACHMENT attachment="definer.txt" attr="" comment="Signal Measuring" date="1382652235" name="definer.txt" path="definer.txt" size="503" user="zwap049" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback