In [ ]:
import scipy.io
import numpy
import os
percorsoIN4096 = "DATI/cands4096/candCoinTOT.mat"
percorsoIN8192 = "DATI/candCoinc8192.mat"
candy8192 = scipy.io.loadmat(percorsoIN8192)
candy18 = candy8192['candy'][0,0]['cand1']
candy28 = candy8192['candy'][0,0]['cand2']
candy4096 = scipy.io.loadmat(percorsoIN4096)
candy14 = candy4096['candy'][0,0]['cand1']
candy24 = candy4096['candy'][0,0]['cand2']
print(candy18.shape, candy14.shape, candy28.shape, candy28.shape, )
candy1 = numpy.concatenate([candy18,candy14],1)
candy2 = numpy.concatenate([candy28,candy24],1)
print(candy1.shape,candy2.shape)
freq1 = candy1[0]
freq2 = candy2[0]
critRat1 = candy1[5]
critRat2 = candy2[5]
ampl1 = candy1[4]
ampl2 = candy2[4]
spindown1 = candy1[3]
spindown2 = candy2[3]
coo1=candy1[6:8]
coo2=candy2[6:8]
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
a = pyplot.scatter(coo1[0],coo1[1], s = 5, label='H')
b = pyplot.scatter(coo2[0],coo2[1], s = 5, label = 'L')
#pyplot.loglog()
pyplot.legend();
pyplot.show()
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
#a = pyplot.scatter(freq1,ampl1, s = 2, label='H')
#b = pyplot.scatter(freq2,ampl2, s = 2, label = 'L')
a = pyplot.scatter(freq1,critRat1, s = 2, label='H')
b = pyplot.scatter(freq2,critRat2, s = 2, label = 'L')
pyplot.semilogy()
pyplot.legend(loc='upper left');
pyplot.show()
# vedere num cand in funzione di frequenza, ogni hertz TODO nb deve fluttuare al massimo in un fattore 2
#se c'è molto disturbo ci si aspetta ci siano molto pochi secondari, per questo il fattore 2
In [ ]:
sogliaCR = 6
filtro1 = numpy.where(critRat1 > sogliaCR)
filtro2 = numpy.where(critRat2 > sogliaCR)
critRatMedio = (critRat1+critRat2)/2
filtromedio = numpy.where(critRatMedio > sogliaCR)
#critRat1filtro1 = critRat1[filtro1]
#critRat2filtro1 = critRat2[filtro1]
#critRat1filtro2 = critRat1[filtro2]
#critRat2filtro2 = critRat2[filtro2]
#critRat1filtromedio = critRat1[filtromedio]
#critRat2filtromedio = critRat2[filtromedio]
#annullatore1 = numpy.where(critRat1 <= sogliaCR)
#annullatore2 = numpy.where(critRat2 <= sogliaCR)
#critRat1[annullatore1] = 0
#critRat1[annullatore2] = 0
#critRat2[annullatore1] = 0
critRat2[annullatore2] = 0
nonzeri1 = numpy.nonzero(critRat1)
nonzeri2 = numpy.nonzero(critRat2)
critRat1filtroboth = critRat1[nonzeri1[0]]#[filtroboth]
critRat2filtroboth = critRat2[nonzeri2[0]]#[filtroboth]
print(numpy.amin(critRat1filtroboth), numpy.amin(critRat2filtroboth))
frequenzefiltro1 = freq1[filtro1]
frequenzefiltro2 = freq2[filtro2]
frequenzefiltromedio = freq1[filtromedio]
frequenzefiltroboth = freq1[nonzeri1]
spindowni1filtroboth = spindown1[nonzeri1]
spindowni2filtroboth = spindown2[nonzeri2]
#print(critRat1filtro1.size, critRat1filtro2.size, critRat1filtroboth.size, critRat2filtro1.size, critRat2filtro2.size, critRat2filtroboth.size)
In [ ]:
print(critRat1filtromedio.size, critRat2filtromedio.size)
from matplotlib import pyplot
%matplotlib notebook
pyplot.figure(figsize=(10, 8))
a = pyplot.scatter(frequenzefiltromedio, critRat1filtromedio, s = 10)
b = pyplot.scatter(frequenzefiltromedio,critRat2filtromedio, s = 10)
#pyplot.semilogx()
pyplot.loglog()
pyplot.show()
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
pyplot.figure(figsize=(10, 8))
a = pyplot.scatter(frequenzefiltro1,critRat1filtro1, s = 10)
b = pyplot.scatter(frequenzefiltro1,critRat2filtro1, s = 10)
#pyplot.semilogx()
pyplot.loglog()
pyplot.show()
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
pyplot.figure(figsize=(10, 8))
a = pyplot.scatter(frequenzefiltro2,critRat1filtro2, s = 10)
b = pyplot.scatter(frequenzefiltro2,critRat2filtro2, s = 10)
#pyplot.semilogx()
pyplot.loglog()
pyplot.show()
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
pyplot.figure(figsize=(10, 8))
a = pyplot.scatter(frequenzefiltroboth,critRat1filtroboth, s = 10)
b = pyplot.scatter(frequenzefiltroboth,critRat2filtroboth, s = 10)
#pyplot.semilogx()
pyplot.loglog()
pyplot.show()
In [ ]:
h0Livingston = numpy.loadtxt('/home/protoss/Documenti/TESI/DATI/strainsensib/2017-07-20_C01_L1_O2_Sensitivity_strain_asd.txt')
h0Hanford = numpy.loadtxt('/home/protoss/Documenti/TESI/DATI/strainsensib/2016-12-08_C01_H1_O2_Sensitivity_strain_asd.txt')
print(numpy.where(h0Livingston[:,0]>128))
print(numpy.where(h0Hanford[:,0]>128))
print(numpy.where(h0Livingston[:,0]>512))
print(numpy.where(h0Hanford[:,0]>512))
In [ ]:
from matplotlib import pyplot
%matplotlib notebook
pyplot.figure(figsize=(10, 8))
a = pyplot.scatter(h0Livingston[:4015,0],h0Livingston[:4015,1], s = 10)
b = pyplot.scatter(h0Hanford[:4015,0],h0Hanford[:4015,1], s = 10)
#a = pyplot.scatter(h0Livingston[:,0],h0Livingston[:,1], s = 1)
#b = pyplot.scatter(h0Hanford[:,0],h0Hanford[:,1], s = 1)
#c = pyplot.scatter(frequenzefiltroboth,critRat1filtroboth*1e-21, s = 10)
#d = pyplot.scatter(frequenzefiltroboth,critRat2filtroboth*1e-21, s = 10)
c = pyplot.scatter(frequenzefiltromedio,critRat1filtromedio*1e-21, s = 10)
d = pyplot.scatter(frequenzefiltromedio,critRat2filtromedio*1e-21, s = 10)
ymin = numpy.amin(h0Livingston[:,1])
ymax = numpy.amax(h0Livingston[:,1])
pyplot.ylim((ymin,ymax))
#pyplot.semilogy()
pyplot.loglog()
pyplot.show()