def _convert_beam(self, options): if type(options.beam) is PencilBeam: old = options.beam options.beam = GaussianBeam(old.energy_eV, 0.0, old.particle, old.origin_m, old.direction, old.aperture_rad) self._warn("Pencil beam converted to Gaussian beam with 0 m diameter") if not _Converter._convert_beam(self, options): return False return True
def _convert_beam(self, options): if type(options.beam) is PencilBeam: old = options.beam options.beam = GaussianBeam(old.energy_eV, 0.0, old.particle, old.origin_m, old.direction, old.aperture_rad) self._warn( "Pencil beam converted to Gaussian beam with 0 m diameter") if not _Converter._convert_beam(self, options): return False return True
def _convert_beam(self, options): if not _Converter._convert_beam(self, options): return False if options.beam.energy_eV > 400e3: self._warn("Beam energy must be less than 400 keV.", "This options definition was removed.") return False if options.beam.aperture_rad != 0.0: self._warn("Monaco does not support beam aperture.", "This options definition was removed.") return False return True
def _convert_beam(self, options): if type(options.beam) is PencilBeam: old = options.beam options.beam = GaussianBeam(old.energy_eV, 0.0, old.particle, old.origin_m, old.direction, old.aperture_rad) self._warn("Pencil beam converted to Gaussian beam with 0 m diameter") if not _Converter._convert_beam(self, options): return False if options.beam.energy_eV > 1e6: self._warn("Beam energy must be less than 1MeV", "This options definition was removed.") return False if options.beam.aperture_rad != 0.0: self._warn("Beam aperture is not supported." "This options definition was removed.") return False return True
def _convert_beam(self, options): if not _Converter._convert_beam(self, options): return False if options.beam.energy_eV < 100: self._warn("Beam energy must be greater or equal to 100 eV", "This options definition was removed.") return False if options.beam.origin_m == (0, 0, 1): options.beam.origin_m = (0, 0, 0.09) self._warn('Change origin position to fit inside NISTMonte microscope chamber') if any(map(lambda p: p >= 0.1, options.beam.origin_m)): self._warn("Origin must be within a sphere with radius of 0.1 m", "This options definition was removed.") return False return True
def _convert_beam(self, options): if not _Converter._convert_beam(self, options): return False if options.beam.energy_eV < 100: self._warn("Beam energy must be greater or equal to 100 eV", "This options definition was removed.") return False if options.beam.origin_m == (0, 0, 1): options.beam.origin_m = (0, 0, 0.09) self._warn( 'Change origin position to fit inside NISTMonte microscope chamber' ) if any(map(lambda p: p >= 0.1, options.beam.origin_m)): self._warn("Origin must be within a sphere with radius of 0.1 m", "This options definition was removed.") return False return True
def _convert_beam(self, options): if type(options.beam) is PencilBeam: old = options.beam options.beam = GaussianBeam(old.energy_eV, 0.0, old.particle, old.origin_m, old.direction, old.aperture_rad) self._warn( "Pencil beam converted to Gaussian beam with 0 m diameter") if not _Converter._convert_beam(self, options): return False if options.beam.energy_eV > 1e6: self._warn("Beam energy must be less than 1MeV", "This options definition was removed.") return False if options.beam.aperture_rad != 0.0: self._warn('Beam aperture is not supported.' "This options definition was removed.") return False return True