Click or drag to resize

ParticleSource Class

A wrapped particle source class that allows accessing and modifying of a particle source using the API.
Inheritance Hierarchy
SystemObject
  ema3d.Api.V25.Charging.ExcitationParticleSource

Namespace: ema3d.Api.V25.Charging.Excitation
Assembly: ema3d.Api.V25 (in ema3d.Api.V25.dll) Version: 0.0.0.0
Syntax
public class ParticleSource

The ParticleSource type exposes the following members.

Properties
 NameDescription
Public propertyAtomicNumber Gets/sets the atomic number for the particle source. Only accessible for an ion type particle source.
Public propertyCharge Gets/sets the charge value in electrons for an ion particle source. Set only accessible for an ion type particle source.
Public propertyChargeDensity Gets/sets the charge density in A/m^3 for the charge-density-shaped particle source. Set only accessible for a charge-density-shaped particle source.
Public propertyCurrent Gets/sets the current in A/m^2 (in n/m^2 s for neutral particles) for the monenergetic input type particle source. Set only accessible for particle sources not of type STK or when of type File, override file currents is true.
Public propertyCylindricalPlane Gets/sets the normal direction of the plane for a cylinder-shaped particle source. Set only accessible for a cylinder-shaped particle source.
Public propertyDirection Gets/sets the direction for the planar-shaped particle source. Set only accessible for a planar-shaped particle source.
Public propertyDivisions Gets/sets the number of sources for a cylinder-shaped particle source. Set only accessible for a spherical-shaped particle source.
Public propertyIncidenceType Gets/sets the incidence type for the a spherical-shaped particle source. Set only accessible for a spherical-shaped particle source.
Public propertyIntegralFluxTime Gets/sets the integral flux time for the manual input type particle source. Only accessible for a manual input type particle.
Public propertyNegX Gets/sets a boolean indicating if the particle is activated in the -x direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertyNegY Gets/sets a boolean indicating if the particle is activated in the -y direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertyNegZ Gets/sets a boolean indicating if the particle is activated in the -z direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertyNuclearExcitation Gets/sets the nuclear excitation in MeV for an ion particle source. Set only accessible for an ion type particle source.
Public propertyNucleonNumber Gets/sets the nucleon number for the particle source. Set only accessible for an ion type particle source.
Public propertyNumberParticles Gets/sets the number of particles for the particle source.
Public propertyNumberTimeSteps Gets/sets the number of time steps for the particle source.
Public propertyOverrideFileCurrents Gets/sets a boolean that overrides current in imported file with the value from current. Set only accessible for a file input type particle source.
Public propertyParticleInputType Gets/sets the method of input for the particle source.
Public propertyParticleType Gets/sets the type of particle for the particle source.
Public propertyPlanarPlane Gets/sets the normal direction of the plane for a planar-shaped particle source. Set only accessible for a planar-shaped particle source.
Public propertyPosX Gets/sets a boolean indicating if the particle is activated in the +x direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertyPosY Gets/sets a boolean indicating if the particle is activated in the +y direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertyPosZ Gets/sets a boolean indicating if the particle is activated in the +z direction for a box-shaped source. Set only accessible for a box-shaped particle source.
Public propertySatelliteName Gets/sets the name of satellite to be imported from STK. Set only accessible for a STK input type particle source.
Public propertyShape Get/sets the shape for the particle source.
Public propertySpectrumEnergy Gets/sets the spectrum energy in MeV for the monenergetic input type particle source. Set only accessible for a monoenergetic input type particle source.
Public propertySpectrumEnergyBins Gets the spectrum energy bins for the manual input type particle source.
Public propertySpectrumFile Gets/sets the file name for the file input type particle source. On set, if the file exists and is different than the previous file, the spectrum file will be read in. Set only accessible for a file input type particle source.
Public propertySyncSTK Gets boolean indicating whether the paricle source is synced with STK. On set, if true, the spectrum file will be read from STK. Set only accessible for a STK input type particle source.
Top
Methods
 NameDescription
Public methodCopy Copy this ParticleSource to the same or a new document
Public methodStatic memberCreate Creates a new default ParticleSource within the document.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
Python
from ema3d.Api.V25.Charging.Excitation import ParticleSource as ParticleSource
import ema3d.Api.V25.Charging.Excitation as Excitation
# Create particle source
_ps = ParticleSource.Create(Window.ActiveWindow.Document)
# Configure Particle Source Properties
particleSource.NumberParticles = 2000
particleSource.NumberTimeSteps = 1
particleSource.ParticleType = Excitation.ParticleType.Electron
particleSource.Shape = Excitation.ParticleShape.Plane
particleSource.PlanarPlane = Excitation.ParticlePlane.Z
particleSource.Direction = Excitation.ParticleDirection.Neg
Python
from ema3d.Api.V25.Charging.Excitation import ParticleSource as ParticleSource
from System.Collections.Generic import List
import ema3d.Api.V25.Charging.Excitation as Excitation
# Create particle source
_ps = ParticleSource.Create(Window.ActiveWindow.Document)
# Configure Particle Source spectrum manually
_ps.ParticleInputType = Excitation.ParticleInputType.Manual
_ps.Current = 2e-7
_ps.IntegralFluxTime = 2
spectrumEnergyBins = List[List[float]]()
spectrumEnergyBins.Add(List[float]())
spectrumEnergyBins.Add(List[float]())
spectrumEnergyBins.Add(List[float]())
spectrumEnergyBins[0].Add(1)
spectrumEnergyBins[0].Add(1)
spectrumEnergyBins[1].Add(2)
spectrumEnergyBins[1].Add(2)
spectrumEnergyBins[2].Add(3)
spectrumEnergyBins[2].Add(3)
_ps.SpectrumEnergyBins = spectrumEnergyBins
Python
from ema3d.Api.V25.Charging.Excitation import ParticleSource as ParticleSource
import ema3d.Api.V25.Charging.Excitation as Excitation
# Create particle source
_ps = ParticleSource.Create(Window.ActiveWindow.Document)
# Configure Particle Source spectrum with a file
_ps.ParticleInputType = Excitation.ParticleInputType.File
_ps.SpectrumFile = "C:\Users\joe\Downloads\spectrum.dat"
Python
from ema3d.Api.V25.Charging.Excitation import ParticleSource as ParticleSource
import ema3d.Api.V25.Charging.Excitation as Excitation
# Create particle source
_ps = ParticleSource.Create(Window.ActiveWindow.Document)
# Configure Particle Source spectrum with STK
_ps.ParticleInputType = Excitation.ParticleInputType.STK
_ps.SatelliteName = "satellite1"
_ps.SyncSTK = True
See Also