This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def blazed_profile(XX,YY, grating_pitch, wavelength, n1, n0=1, m=1, direction="right", blaze_arrow_angle=0, round_decimals=7): | |
""" | |
Returns the height profile of a blazed gratin | |
Args: | |
:XX: x array from meshgrid | |
:YY: y array from meshgrid | |
:grating_pitch: pitch of the grating, that sets the diffraction angle and blaze angle | |
:wavelength: wavelength of design |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
Image.MAX_IMAGE_PIXELS = 933120000 | |
def join_masks_with_template(filename_mask, filename_template, filename_output, center=True): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pya | |
import sys | |
import os | |
from matplotlib import pyplot as plt | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Software name Software Purpose Link | |
AutoCAD CAD According to our licenses | |
Ansys Lumerical CAD According to our licenses | |
KLayout CAD https://www.klayout.de/build.html | |
Altium Designer CAD \\inl-fps01\Data\Nanofab\8 - Other\1 - Software\Altium | |
National Instruments NI-DAQ mx Electronics Programming https://www.ni.com/en-sg/support/downloads/drivers/download.ni-daq-mx.html | |
Inkscape Image/video manipulation https://inkscape.org/ | |
GIMP Image/video manipulation https://www.gimp.org/ | |
Blender Image/video manipulation https://www.blender.org/download/ | |
ImageJ Image/video manipulation https://imagej.nih.gov/ij/download.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def interpolate_data(x,y,z, step_y, mincount=400): | |
""" Assumes the x is repeated samples and y is the non-periodic signal | |
""" | |
step = step_y | |
x_list = [] | |
y_list = [] | |
z_list = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import os | |
from scipy import interpolate | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import numpy as np | |
from json import JSONEncoder | |
def open_data_file(filename): | |
# Load data from json file | |
with open(filename, 'r') as fp: | |
json_dict = json.load(fp) | |
return json_dict | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sounddevice as sd | |
import numpy as np | |
import scipy.io.wavfile as wav | |
# print(sd.query_devices()) | |
device_list = sd.query_devices() | |
# find and select index of Line (UMIK-2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy import constants as const | |
import nidaqmx | |
# Creating the actuation signal | |
max_displacement = 250*1e-9 | |
f_displacement = 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.grid() | |
plt.minorticks_on() | |
plt.grid(True, which='minor', linestyle='-', lw=0.1) |
NewerOlder