Beispiel #1
0
 def plot_JDF(cls):
     xmin=minx([])
     xmax=maxx([])
     ymin=miny([])
     ymax=maxy([])
     cls.jdf.get_member("xy_offsets").reset(cls.jdf)
     xy_off=cls.jdf.xy_offsets
     log_debug(2)
     for p in cls.jdf.patterns:
         a=cls.agent_dict[p.name]
         reset_properties(a) #fix updating of properties
         reset_property(a, "polylist")
         log_debug(a)
         verts=[]
         for chip in xy_off.get(p.name, []):
             sPoly(a, x_off=chip[0]*1.0e-6, y_off=chip[1]*1.0e-6, vs=verts)
         log_debug(a)
         pf=cls.plot.plot_dict.get(a.name+"_plot", None)
         if pf is None:
             cls.plot.polygon(verts, color=a.color, plot_name=a.name+"_plot")
         else:
             pf.alter_xy(verts, color=a.color)
         log_debug(a)
         xmin=min([minx(verts), xmin])
         xmax=max([maxx(verts), xmax])
         ymin=min([miny(verts), ymin])
         ymax=max([maxy(verts), ymax])
     log_debug(1)
     cls.plot.set_xlim(xmin, xmax)
     cls.plot.set_ylim(ymin, ymax)
     cls.plot.draw()
Beispiel #2
0
 def polylist(self):
     """makes 4 branched testpad through reflections"""
     self.verts=[]
     reset_property(self, "_s_testpad_TL")
     self.verts.extend(self._s_testpad_TL)
     self.verts.extend(horiz_refl(self._s_testpad_TL))
     self.verts.extend(vert_refl(self._s_testpad_TL))
     self.verts.extend(horizvert_refl(self._s_testpad_TL))
     return self.verts
Beispiel #3
0
 def polylist(self):
     """makes 4 branched testpad through reflections"""
     self.verts = []
     reset_property(self, "_s_testpad_TL")
     self.verts.extend(self._s_testpad_TL)
     self.verts.extend(horiz_refl(self._s_testpad_TL))
     self.verts.extend(vert_refl(self._s_testpad_TL))
     self.verts.extend(horizvert_refl(self._s_testpad_TL))
     return self.verts
Beispiel #4
0
 def make_bond_pads(self):
     """creates bond pad portion by reflecting and rotating TL bond pad.
     Left and right bond pads are offset so gap is centered on chip. Top and bottom bond pads are not"""
     self.ocpw=self.gap/2.0+self.w/2.0
     reset_property(self, "_s_bond_pad_TL")
     self.verts.extend(self._s_bond_pad_TL)
     self.verts.extend(horiz_refl(self._s_bond_pad_TL))
     self.ocpw=0
     reset_property(self, "_s_bond_pad_TL")
     self.verts.extend(rotate(horiz_refl(self._s_bond_pad_TL), 90))
     self.verts.extend(vert_refl(rotate(horiz_refl(self._s_bond_pad_TL), 90)))
     self.ocpw=self.gap/2.0+self.w/2.0
Beispiel #5
0
 def make_bond_pads(self):
     """creates bond pad portion by reflecting and rotating TL bond pad.
     Left and right bond pads are offset so gap is centered on chip. Top and bottom bond pads are not"""
     self.ocpw = self.gap / 2.0 + self.w / 2.0
     reset_property(self, "_s_bond_pad_TL")
     self.verts.extend(self._s_bond_pad_TL)
     self.verts.extend(horiz_refl(self._s_bond_pad_TL))
     self.ocpw = 0
     reset_property(self, "_s_bond_pad_TL")
     self.verts.extend(rotate(horiz_refl(self._s_bond_pad_TL), 90))
     self.verts.extend(
         vert_refl(rotate(horiz_refl(self._s_bond_pad_TL), 90)))
     self.ocpw = self.gap / 2.0 + self.w / 2.0
Beispiel #6
0
 def polylist(self):
     """creates pads by using reflection on mark box and making bond pads"""
     self.verts=[]
     self.make_bond_pads()
     reset_property(self, "_s_labelbox_TL")
     self.verts.extend(self._s_labelbox_TL)
     reset_property(self, "_s_markbox_BL")
     self.verts.extend(self._s_markbox_BL)
     self.verts.extend(horiz_refl(self._s_markbox_BL))
     self.verts.extend(horizvert_refl(self._s_markbox_BL))
     self.Poly(self.test_pads, x_off=-self.testx, y_off=self.testy)
     self.Poly(self.test_pads, x_off=self.testx, y_off=self.testy)
     self.Poly(self.test_pads, x_off=self.testx, y_off=-self.testy)
     return self.verts
Beispiel #7
0
 def polylist(self):
     """creates pads by using reflection on mark box and making bond pads"""
     self.verts = []
     self.make_bond_pads()
     reset_property(self, "_s_labelbox_TL")
     self.verts.extend(self._s_labelbox_TL)
     reset_property(self, "_s_markbox_BL")
     self.verts.extend(self._s_markbox_BL)
     self.verts.extend(horiz_refl(self._s_markbox_BL))
     self.verts.extend(horizvert_refl(self._s_markbox_BL))
     self.Poly(self.test_pads, x_off=-self.testx, y_off=self.testy)
     self.Poly(self.test_pads, x_off=self.testx, y_off=self.testy)
     self.Poly(self.test_pads, x_off=self.testx, y_off=-self.testy)
     return self.verts
Beispiel #8
0
 def plot_JDF(cls):
     xmin = minx([])
     xmax = maxx([])
     ymin = miny([])
     ymax = maxy([])
     cls.jdf.get_member("xy_offsets").reset(cls.jdf)
     xy_off = cls.jdf.xy_offsets
     log_debug(2)
     for p in cls.jdf.patterns:
         a = cls.agent_dict[p.name]
         reset_properties(a)  #fix updating of properties
         reset_property(a, "polylist")
         log_debug(a)
         verts = []
         for chip in xy_off.get(p.name, []):
             sPoly(a,
                   x_off=chip[0] * 1.0e-6,
                   y_off=chip[1] * 1.0e-6,
                   vs=verts)
         log_debug(a)
         pf = cls.plot.plot_dict.get(a.name + "_plot", None)
         if pf is None:
             cls.plot.polygon(verts,
                              color=a.color,
                              plot_name=a.name + "_plot")
         else:
             pf.alter_xy(verts, color=a.color)
         log_debug(a)
         xmin = min([minx(verts), xmin])
         xmax = max([maxx(verts), xmax])
         ymin = min([miny(verts), ymin])
         ymax = max([maxy(verts), ymax])
     log_debug(1)
     cls.plot.set_xlim(xmin, xmax)
     cls.plot.set_ylim(ymin, ymax)
     cls.plot.draw()
    print shape(a.MagAbsFilt_sq)
    pl1=a.center_plot()

if __name__=="__main__":
    a.flux_indices=[range(200, 400)]#, range(436, 610)]
    fit1=a.fit_indices[:]
    a.fit_indices=[[1], range(4, 11), [15], range(17, 23), range(26, 28), range(29, 37), range(38, 41), range(42,53), range(56,68),
                   range(71,77), range(78,81), [84], range(104,107), range(108,111), [116], range(124,129), [138],
                   range(182,184), range(189,194),
                   range(218, 255), range(264, 285), range(310,325)]#, range(337,348)]
    #a.fit_indices=[range(2, 14), range(15, 17), range(19,23), range(24, 26), range(29, 37), range(38, 39), range(44, 46), range(48, 52),
    #           range(54, 66), range(67, 69), range(70, 85), range(105, 107), range(108, 116), range(122, 129), [130], range(132, 134), [138],
    #             range(189, 193), range(199, 200), range(217, 251+1), range(266, 275+1), range(314, 324+1)]

    a.fitter.fit_params=None
    reset_property(a, "fit_params", "MagAbsFit", "MagcomFilt", "Magcom")
    if 0:
        a.filter_type="None"

        pl=a.magabs_colormesh(pl=pl)

        a.filter_type="FFT"
        a.magabs_colormesh(pl=pl)#.show()
    a.filter_type="Fit"

    a.magabs_colormesh(pl=pl, vmin=0.995, vmax=1.005, cmap="nipy_spectral", auto_zlim=False, fig_width=9, fig_height=6)#.show()
    centers=a.qdt._get_fluxfq0(f=a.frequency[a.indices])

    print [a.indices[n] for n, fp in enumerate(a.fit_params) if absolute(fp[1]-centers[n])>0.3]

    pl1=a.center_plot(pl=pl1)