Пример #1
0
        def strip_eloss(self, strip_int):
            if (self.E <= 0.0):
                self.E = 0.0
                return 0.0
            else:
                beam_trim = TRIM(target,
                                 Ion(self.title,
                                     energy=self.E * 1.0e6,
                                     mass=self.M),
                                 number_ions=num_ions,
                                 calculation=1)
                beam_results = beam_trim.run(srim_executable_directory)

                beam_energy = beam_results.ioniz.ions * 100
                beam_depth = beam_results.ioniz.depth * 1e-8

                f = interp1d(beam_depth, beam_energy, kind='linear')
                xnew = np.linspace(0.0157, 1.57, 100)
                ynew = f(xnew)

                eloss = integrate.quad(f, 0.0157, 1.57)[0]

                self.E = self.E - eloss
                self.strip[strip_int] = eloss

            return eloss
Пример #2
0
def create_ion_list(
    ion_name: Literal['H', 'He', 'Li'],
    energy_list: Union[Sequence[int], Set[int]],
    units: Literal['ev', 'kev', 'mev'],
) -> List[Ion]:
    ion_list = [Ion(f'{ion_name}', energy=x * 1000)
                for x in energy_list]  # sourcery skip
    return ion_list
Пример #3
0
        def plot_bragg(self):

            target = Target([setlayer(target_gas, gas_pressure, 2.8e9)])

            beam_trim = TRIM(target,
                             Ion(self.title,
                                 energy=self.E_init * 1.0e6,
                                 mass=self.M),
                             number_ions=250,
                             calculation=1)
            beam_results = beam_trim.run(srim_executable_directory)

            beam_energy = beam_results.ioniz.ions * 100
            beam_depth = beam_results.ioniz.depth * 1e-8

            f = interp1d(beam_depth, beam_energy, kind='linear')
            xnew = np.linspace(0.28, 28.0, 100)
            ynew = f(beam_depth)

            plt.plot(beam_depth * 0.60714285714, ynew)
Пример #4
0
        def dead_eloss(self):

            beam_trim = TRIM(dead,
                             Ion(self.title,
                                 energy=self.E * 1.0e6,
                                 mass=self.M),
                             number_ions=num_ions,
                             calculation=1)
            beam_results = beam_trim.run(srim_executable_directory)

            beam_energy = beam_results.ioniz.ions * 100
            beam_depth = beam_results.ioniz.depth * 1e-8

            f = interp1d(beam_depth, beam_energy, kind='linear')
            xnew = np.linspace(0.0230251, 2.30251, 100)
            ynew = f(xnew)

            eloss = integrate.quad(f, 0.0230251, 2.30251)[0]

            self.E = self.E - eloss

            return eloss
Пример #5
0
        def window_eloss(self):

            beam_trim = TRIM(window,
                             Ion(self.title,
                                 energy=self.E * 1.0e6,
                                 mass=self.M),
                             number_ions=num_ions,
                             calculation=1)
            beam_results = beam_trim.run(srim_executable_directory)

            beam_energy = beam_results.ioniz.ions * 100
            beam_depth = beam_results.ioniz.depth * 1e-8
            print(beam_depth)
            f = interp1d(beam_depth, beam_energy, kind='linear')
            xnew = np.linspace(6.00010e-06, 6.00000e-04, 100)
            ynew = f(xnew)

            eloss = integrate.quad(f, 6.00010e-06, 6.00000e-04)[0]

            self.E = self.E - eloss

            return eloss
Пример #6
0
            'E_d': Ed_enery_postrior,  # Displacement Energy [eV]
            'lattice': 0.0,
            'surface': 3.0
        }}, density=8.9, width=20000.0)
    # Construct a target of a single layer of Nickel
    target = Target([layer])
    return target

#*************************************************************************************
# Simulator Setting
# Construct a 3MeV Nickel ion
# TRIM.copy_output_files('c:/SRIM-Pro', 'c:/SRIM-Pro/SRIM Outputs')
# Specify the directory of SRIM.exe
srim_executable_directory = 'c://SRIM-Pro'
# ION Type and Energy and Mass
ion = Ion('Ni', energy=3.0e6)

# Construct a layer of nick 20um thick with a displacement energy of 30 eV
# Parameters to be optimized
E_d_prior = 30.0 # Displacement Energy [eV]
number_of_IONs = 50

# PRIOR for Parameter to be Optimized
prior = D.Uniform(E_d_prior-3, E_d_prior+3)

# Architecture definitions for Ratio Estimator - Neural Network
activation = torch.nn.ELU
layers = [64, 64, 64]
inputs_shape = (7,)
outputs_shape = (1,)
Пример #7
0
cmpd_ceo2_dict = {
    'Ce': {
        'stoich': 1.0,
        **elem_ce_dict
    },
    'O': {
        'stoich': 2.0,
        **elem_o_dict
    },
}

energy__kev_list = [
    100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000
]

ion_Ni = Ion('Ni', energy=3.0e6)
ions_He_list = [Ion('He', energy=x * 1000) for x in energy__kev_list]
# print(ion.symbol, ion.name)
# print(ion.energy)

# Construct layers
layer_Ni = Layer(
    {'Ni': {
        'stoich': 1.0,
        'E_d': 30.0,
        'lattice': 0.0,
        'surface': 3.0
    }},
    density=8.9,
    width=20_000.0,
    name='Ni')
# use a 0.5 mm sapphire layer as the bottom "substrate"
Al2O3 = Layer(
    {"Al": {"stoich": 2.0}, "O": {"stoich": 3.0},},
    density=3.95,
    width=50000.0,
    name="Al2O3",
)
layers.append(Al2O3)

# construct the mulitlayer target using the layers list
target = Target(layers)

# loop over implantation energies
for E_eV in Energy_eV:
    # Construct the implanted 8Li ion
    ion = Ion("Li", energy=E_eV, mass=m_8Li)
    # Initialize a TRIM calculation with the ion & target
    trim = TRIM(
        target,
        ion,
        calculation=2,
        number_ions=N_Ions,
        description="%.0f eV 8Li implanted in heterostructure" % E_eV,
        # reminders="",
        # autosave=1000,
        plot_mode=5,
        # plot_xmin=0,
        # plot_xmax=0,
        ranges=True,
        backscattered=True,
        transmit=True,