Example #1
0
row = 0

# MZIlen_list = [700, 975, 1250, 1515]
MZIlen_list = [1250]
x_dist = 930
y_dist = 1760
# y_steps = 275
y_steps = -265

for col, MZ_length in enumerate(MZIlen_list):
    temp_cell = Demux_active(
        coupler_sep,
        coupler_length,
        MZ_length,
        electrodes_sep,
        id_to_alphanumeric(row, col),
        exp_wg_width=wg_Expwidth,
        grating_coupler_period=std_coupler_params['grating_period'])
    demux_cell.add_cell(temp_cell,
                        origin=(OriginTests[0], OriginTests[1]),
                        angle=np.pi)

# ### ADDING DEMUX WRITEFIELDS
wf_maxlength = 1040
dmx_wf_layer = 210

first_line_bounds = [1020, 960, 1650, 1270]
second_line_bounds = [1180, 1270, 1420, 3175]
turn_bounds = [650, 3175, 1420, 3290]
third_line_bounds = [650, 1270, 880, 3175]
fourth_line_bounds = [370, 960, 1010, 1270]
Example #2
0
 def test_id_to_alphanumeric(self):
     self.assertEqual(id_to_alphanumeric(4, 26 + 25), 'AZ4')
Example #3
0
    def test_alphanumeric_to_id(self):
        self.assertEqual((4, 26 + 25), alphanumeric_to_id('AZ4'))

        for pair in [(0, 0), (0, 10), (0, 100), (100, 0), (100, 100)]:
            self.assertEqual(pair,
                             alphanumeric_to_id(id_to_alphanumeric(*pair)))
#######################################################################################
if __name__ == "__main__":
    wg_layer = 9
    box_layer = 100
    comment_layer = 11
    marker_layer_1 = 3
    marker_layer_2 = 4
    marker_protection_layer = 15

    spacing = np.array((1250, 330))
    spacing2 = np.array((500, 330))

    devices = []

    #### ADD RING TESTS
    devices += [Ring_Test(np.array((420, 250)) * (x, y), id_to_alphanumeric(x, y), gap, ring_r)
                for x, gap in enumerate(np.linspace(0.3, 1, 3))
                for y, ring_r in enumerate(np.linspace(30, 80, 3))]

    #### ADD GRATING COUPLERS TESTS
    # devices += [Efficiency_Grating(np.array((420, 250)) * (x, y) + (5000, 2700), id_to_alphanumeric(x, y), period, ff)
    #             for x, period in enumerate(np.linspace(0.88, 0.92, 3)) for y, ff in
    #             enumerate(np.linspace(0.28, 0.33, 3))]

    #### ADD RINGS TESTS
    # devices += [DeviceCouplerRing(np.array((480, 580)) * (x, y) + (-380, 2700), id_to_alphanumeric(y, x), gap, radius)
    #             for x, gap in enumerate(np.linspace(0.1, 1, 10)) for y, radius in enumerate(np.linspace(50, 200, 6))]

    #### ADD DIRECTIONAL-COUPLERS TESTS

    # def FSR_to_L(FSR_GHz, n_g=1.598562):