129 newGraphsIntermediate = []
133 for i, graph
in enumerate(graphs+[nomGraph]):
136 for iPoint
in xrange(0, graph.GetN()) :
138 dataPointX = Double(0)
139 dataPointY = Double(0)
141 graph.GetPoint(iPoint,dataPointX,dataPointY)
142 dataErrorX = graph.GetErrorX(iPoint)
143 dataErrorY = graph.GetErrorY(iPoint)
145 print graph.GetName()
147 print "removeLargeErrorPoints:" , dataPointX, dataPointY, dataErrorX, dataErrorY
149 if dataErrorY > 0.011
or dataErrorY < 0.00000001 :
150 if not (iPoint
in badPoints) : badPoints.append(iPoint)
154 for i, graph
in enumerate(graphs):
156 newGraph = graph.Clone()
157 newGraphsFinal.append(newGraph)
159 for iPoint
in xrange(0, graph.GetN()) :
161 dataPointX = Double(0)
162 dataPointY = Double(0)
164 dataErrorX = graph.GetErrorX(iPoint)
165 dataErrorY = graph.GetErrorY(iPoint)
167 graph.GetPoint(iPoint,dataPointX,dataPointY)
169 if not (iPoint
in badPoints) :
170 newGraph.SetPoint(iPoint, dataPointX, dataPointY)
171 newGraph.SetPointError(iPoint, dataErrorX, dataErrorY)
174 newGraph.SetPoint(iPoint, dataPointX, 1)
175 newGraph.SetPointError(iPoint, dataErrorX, 0)
178 nomGraphFinal = nomGraph.Clone()
180 for iPoint
in xrange(0, nomGraph.GetN()) :
182 dataPointX = Double(0)
183 dataPointY = Double(0)
184 nomGraph.GetPoint(iPoint,dataPointX,dataPointY)
185 dataErrorX = nomGraph.GetErrorX(iPoint)
186 dataErrorY = nomGraph.GetErrorY(iPoint)
188 if not (iPoint
in badPoints) :
189 nomGraphFinal.SetPoint(iPoint, dataPointX, dataPointY)
190 nomGraphFinal.SetPointError(iPoint, dataErrorX, dataErrorY)
193 nomGraphFinal.SetPoint(iPoint, dataPointX, 1)
194 nomGraphFinal.SetPointError(iPoint, dataErrorX, 0)
203 return nomGraphFinal, newGraphsFinal