You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New function for creating stream files out of numpy arrays.
import numpy as np
def streamfile(filename, profile, n_passes, sputter_rate, dwell_time_base):
# Dwell time base = 100ns
# Sputter rate = ?
profile = profile / (n_passes * sputter_rate * dwell_time_base)
# create a list of lists
profile_list = []
for i in range(profile.shape[0]):
for j in range(profile.shape[1]):
profile_list.append([profile[i,j], i, j])
# write the header
np.random.shuffle(profile_list)
with open(filename, "w") as f:
f.write("s\n")
f.write(str(n_passes)+"\n")
f.write(str(profile.shape[0]*profile.shape[1])+"\n")
# write the profile
with open(filename, "a") as f:
for i in range(len(profile_list)):
f.write(str(profile_list[i][0])+" "+str(profile_list[i][1])+" "+str(profile_list[i][2])+"\n")
The text was updated successfully, but these errors were encountered:
New function for creating stream files out of numpy arrays.
import numpy as np
def streamfile(filename, profile, n_passes, sputter_rate, dwell_time_base):
# Dwell time base = 100ns
# Sputter rate = ?
The text was updated successfully, but these errors were encountered: