##// END OF EJS Templates
Getnoise se agrega al metodo getFft de SpectraProcessor.
Daniel Valdez -
r111:9c1626ca5c6a
parent child
Show More
@@ -191,17 +191,17 def cmap1_init(colormap="gray"):
191 191 def setColormap(colormap="jet"):
192 192 cmap1_init(colormap)
193 193
194 def savePlplot(indexPlot,filename,ncol,nrow,width,height):
194 def savePlplot(filename,width,height):
195 195 curr_strm = plplot.plgstrm()
196 196 save_strm = plplot.plmkstrm()
197 plplot.plsetopt("geometry", "%dx%d"%(width*ncol,height*nrow))
198 plplot.plsdev("pngcairo")
197 plplot.plsetopt("geometry", "%dx%d"%(width,height))
198 plplot.plsdev("png")
199 199 plplot.plsfnam(filename)
200 200 plplot.plcpstrm(curr_strm,0)
201 201 plplot.plreplot()
202 plplot.plclear()
202 203 plplot.plend1()
203 plplot.plsstrm(indexPlot)
204 print ''
204 plplot.plsstrm(curr_strm)
205 205
206 206
207 207 def initPlplot(indexPlot,ncol,nrow,winTitle,width,height):
@@ -740,7 +740,9 class SpectraPlot:
740 740 now = datetime.datetime.now().timetuple()
741 741 file = "spc_img%02d_%03d_%02d%02d%02d"%(indexPlot,now[7],now[3],now[4],now[5])
742 742 filename = os.path.join(path,file+".png")
743 savePlplot(indexPlot,filename,self.ncol,self.nrow,self.width,self.height)
743 width = self.width*self.ncol
744 hei = self.height*self.nrow
745 savePlplot(filename,width,hei)
744 746
745 747
746 748
@@ -148,7 +148,7 class Noise:
148 148 """
149 149
150 150 if data == None:
151 return 0
151 raise ValueError, "The data value is not defined"
152 152
153 153 shape = data.shape
154 154 self.dim = len(shape)
@@ -239,7 +239,8 class SpectraProcessor:
239 239 self.dataOutObj.data_dc = dc
240 240 self.dataOutObj.m_ProcessingHeader.blockSize = blocksize
241 241 self.dataOutObj.m_BasicHeader.utc = self.dataInObj.m_BasicHeader.utc
242
242
243 self.getNoise()
243 244
244 245 def addWriter(self,wrpath):
245 246 objWriter = SpectraWriter(self.dataOutObj)
@@ -329,7 +330,7 class SpectraProcessor:
329 330 #print "myIncohIntObj.navg: ",myIncohIntObj.navg
330 331 self.dataOutObj.flagNoData = False
331 332
332 self.getNoise(type="hildebrand",parm=myIncohIntObj.navg)
333 self.getNoise(type="hildebrand")
333 334 # self.getNoise(type="sort", parm=16)
334 335
335 336 else:
@@ -357,6 +358,9 class SpectraProcessor:
357 358
358 359 def getNoise(self, type="hildebrand", parm=None):
359 360
361 if parm == None:
362 parm =self.dataOutObj.m_ProcessingHeader.incoherentInt
363
360 364 self.noiseObj.setNoise(self.dataOutObj.data_spc)
361 365
362 366 if type == "hildebrand":
General Comments 0
You need to be logged in to leave comments. Login now