Difference: LucaFruzzaPreliminarycoding ( vs. 1)

Revision 124 Oct 2013 - LucaFruzza

Line: 1 to 1
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

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


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-2024 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