コード例 #1
0
                                                 -0.5 * CHIP.dy)
        chip_p2 = DPoint(bbox.center()) + DPoint(0.5 * CHIP.dx, 0.5 * CHIP.dy)
        chip_box = pya.Box(DPoint(0, 0), DPoint(CHIP.dx, CHIP.dy))

        # forming resonator's tail upper side open-circuited for simulation
        p1 = worm.cop_tail.start
        p2 = p1 + DPoint(0, 20e3)
        empty_cpw_tail_start = CPW(0, Z_res.b / 2, p1, p2)

        # placing all objects in proper order and translating them to origin
        cell.shapes(layer_photo).insert(chip_box)

        # translating all objects so that chip.p1 at coordinate origin
        translation_trans = DCplxTrans(-DVector(chip_p1))

        xmonCross.make_trans(translation_trans)
        xmonCross.place(cell, layer_photo)

        worm.make_trans(translation_trans)
        worm.place(cell, layer_photo)

        empty_cpw_tail_start.place(cell, layer_photo)
        empty_cpw_tail_start.make_trans(translation_trans)
        empty_cpw_tail_start.place(cell, layer_photo)

        xmonCross_corrected = XmonCross(xmon_center, cross_width, cross_len,
                                        xmon_fork_gnd_gap)
        xmonCross_corrected.make_trans(translation_trans)
        xmonCross_corrected.place(cell, layer_photo)

        ## DRAWING SECTION END ##
コード例 #2
0
        p1 = worm.cop_tail.start
        p2 = p1 + DPoint(0, 20e3)
        empty_cpw_tail_start = CPW(0, Z_res.b / 2, p1, p2)

        # placing all objects in proper order and translating them to origin
        cell.shapes(layer_photo).insert(chip_box)

        translation_trans = DCplxTrans(-DVector(chip_p1))
        worm.make_trans(translation_trans)
        worm.place(cell, layer_photo)

        empty_cpw_tail_start.place(cell, layer_photo)
        empty_cpw_tail_start.make_trans(translation_trans)
        empty_cpw_tail_start.place(cell, layer_photo)

        xmonCross.make_trans(translation_trans)
        xmonCross.place(cell, layer_photo)

        ## DRAWING SECTION END ##
        lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
        from sonnetSim.cMD import CMD

        ml_terminal._send(CMD.SAY_HELLO)
        ml_terminal.clear()
        simBox = SimulationBox(CHIP.dx, CHIP.dy, 200, 300)
        ml_terminal.set_boxProps(simBox)
        print("sending cell and layer")