OrsSimulationMcXRAY_157a2ed0808f11e986b5309c235e8fdb¶
| author: | ORS Team |
|---|---|
| contact: | http://theobjects.com |
| email: | info@theobjects.com |
| organization: | Object Research Systems (ORS), Inc. |
| address: | 460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7 |
| copyright: | Object Research Systems (ORS), Inc. All rights reserved 2021. |
| date: | May 27 2019 10:52 |
| dragonflyVersion: | |
| 4.1.0.629 (D) | |
| UUID: | 157a2ed0808f11e986b5309c235e8fdb |
Class Code¶
-
class
OrsPythonPlugins.OrsSimulationMcXRAY_157a2ed0808f11e986b5309c235e8fdb.OrsSimulationMcXRAY_157a2ed0808f11e986b5309c235e8fdb.OrsSimulationMcXRAY_157a2ed0808f11e986b5309c235e8fdb(varname=None)¶ -
EXECUTE_FOR_POINTS= 'ExecuteForPoints'¶
-
EXECUTE_FOR_RULER= 'ExecuteForRuler'¶
-
EXECUTE_FOR_SURFACE= 'ExecuteForSurface'¶
-
INDEX_BSE= 0¶
-
INDEX_EDS= 1¶
-
OrsChooseFaceOnBox= 'OrsChooseFaceOnBox'¶
-
UIDescriptors= [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]¶
-
actionGetSelectedFaceOnClipBox()¶
-
classmethod
actionStartSimulationMcXRAY()¶
-
addDetectorToMicroscope()¶
-
interfacemethod
addSolidSimulationScalarValues(multiROI, labelDetails, labelIndex, timestep)¶ Set scalar value of multiROI at labelIndex as labelDetail.
Parameters: - multiROI (ORSModel.ors.MultiROI) – a multiROI instance
- labelDetails (transient LabelDetails) – a LabelDetail to be added
- labelIndex (int) – label index to be set
- timestep (int) – time step
Returns: output (bool) – True if successful, otherwise False
-
addSpecimenScalarValues(aLabelDetail, labelIndex)¶
-
applySelectionToSample()¶
-
canEnablePositioning()¶
-
canEnterChooseFaceState()¶
-
canShowResultsForSelectedDetector(detectorInstance)¶
-
cleanup()¶ Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.
-
interfacemethod
createSolidSimulation()¶ Return a new instance of SolidSimulation
Returns: aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
-
cropSampleToClipBox()¶
-
interfacemethod
cropSampleToClipBoxForSolidSimulation(multiROI, timestep)¶ Crop sample to clip box
Parameters: - multiROI (ORSModel.ors.MultiROI) – a MultiROI
- timestep (int) – time step
Returns: output (ORSModel.ors.MultiROI) – cropped structured grid
-
deletePreviousSamplingPoints()¶
-
execute()¶
-
executeDistributed()¶
-
interfacemethod
executeForPoints(solidSimulation, listOfPoints, microscope, aProgress: ORSModel.ors.Progress)¶ execute the simulation on points
Parameters: - solidSimulation (transient SolidSimulation) – new SolidSimulation instance
- listOfPoints (tuple) [count=[1, None]] – list of point coordinates
- microscope (transient Microscope) – a microscope
- aProgress (ORSModel.ors.Progress) – progress object
Returns: pointResultList (transient PointResultList) – a PointResultList
-
executeForPointsDistributed(listOfPoints)¶
-
interfacemethod
executeForRuler(solidSimulation, listOfPoints, microscope, aProgress: ORSModel.ors.Progress)¶ execute the simulation on a ruler
Parameters: - solidSimulation (transient SolidSimulation) – new SolidSimulation instance
- listOfPoints (tuple) [count=[1, None]] – list of point coordinates on a ruler
- microscope (transient Microscope) – a microscope
- aProgress (ORSModel.ors.Progress) – progress object
Returns: - listBSEChannels (ORSModel.ors.Channel) [count=[0, None]] – list of channels output bse result
- listEDSChannels (ORSModel.ors.Channel) [count=[0, None]] – list of channels output eds result
- rulerResult (transient MapResult) – emitted characteristic X-ray intensities
-
executeForSurface(IProgress, timeStep)¶
-
executeForSurfaceDistributed()¶
-
interfacemethod
executeOnSurfaceOfRectangle(aSolidSimulation, chosenFace, microscope, IProgress: ORSModel.ors.Progress)¶ execute the simulation on the rectangle
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- chosenFace (ORSModel.ors.Rectangle) – a rectangle
- microscope (transient Microscope) – a microscope
- IProgress (ORSModel.ors.Progress) – progress object
Returns: - listBSEChannels (ORSModel.ors.Channel) [count=[0, None]] – list of channels output bse result
- listEDSChannels (ORSModel.ors.Channel) [count=[0, None]] – list of channels output eds result
- arrayElementIntensities (transient MapResult) – characteristic intensity for elements
-
interfacemethod
executeSimulation(aSolidSimulation)¶ run the simulation fo a given point
Parameters: aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
-
exportDetectorResultToCSV(detectorInstance)¶
-
interfacemethod
exportElectronDetectorResultToCSV(pointResults, detectorIndex, outputFileName)¶ Export the result of an electron detector into a csv file.
Parameters: - pointResults (transient PointResultList) – points results
- detectorIndex (int) – detector index
- outputFileName (str) – output file name
-
exportMicroscopeToXMLFile()¶
-
exportToCSV(pointsToExport, detectorInstance)¶
-
interfacemethod
exportXrayDetectorResultToCSV(pointResults, detectorIndex, beamEnergy, outputFileName)¶ Export the result of a Xray detector to a csv file
Parameters: - pointResults (transient PointResultList) – points results
- detectorIndex (int) – detector index
- beamEnergy (float) – beam energy in eV
- outputFileName (str) – output file name
-
extractEDSMapsAsObject(xrayDetectorIndex, markedElementLinesList)¶
-
interfacemethod
extractEDSMapsAsObjectFromMapResult(xrayDetectorIndex, markedElementLinesList, mapResult)¶ Extract EDS maps for markedElementLinesList from mapResult.
Parameters: - xrayDetectorIndex (int) – the index of Xray detector
- markedElementLinesList (dict) – marked element lines list
- mapResult (transient MapResult) – map results
Returns: - succeed (bool) – true if succeed
- channelList (ORSModel.ors.Channel) [count=[0, None]] – a list of channels that needs to be published
-
getAccumulatorsWindowsMaximumEnergy()¶
-
getAccumulatorsWindowsMaximumEnergyResult()¶
-
getAcquisitionTime()¶
-
getAngleOfIncidence()¶
-
getArrayAtomicNumbers(anArrayToFill)¶
-
classmethod
getAtomCollisionAvailableModels()¶
-
getAtomCollisionModel()¶
-
classmethod
getAtomCrossSectionAvailableModels()¶
-
getAtomCrossSectionModel()¶
-
classmethod
getAtomEnergyLossAvailableModels()¶
-
getAtomEnergyLossModel()¶
-
classmethod
getAtomMeanIonizationPotentialAvailableModels()¶
-
getAtomMeanIonizationPotentialModel()¶
-
classmethod
getAtomScreeningAvailableModels()¶
-
getAtomScreeningModel()¶
-
getAvailableElementLinesListForCharacteristic(detectorIndex)¶
-
getAvailableMicroscopesFromXMLFile()¶
-
interfacemethod
getBSEResultFromSolidSimulation(aSolidSimulation, detectorIndex)¶ get the result of the simulation for an electron detector
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- detectorIndex (int) – a int
Returns: bse (float) – output bse ratio, a float
-
getBackScatteredCoefficient(pointIndex, detectorIndex)¶
-
getBackScatteredCoefficientFromMapResult(detectorIndex)¶
-
getBeamCurrent()¶
-
getBeamEnergy()¶
-
getBeamSize()¶
-
getCharacteristicIntensitiesForLines(detectorIndex, markedElementLinesList)¶ Return elementLines (e.g. [‘Al Ka1’, ‘Cu Ka1’]) and the corresponding intensities for all the point (2D array)
-
getChosenFaceOnBox(timestep=0) → ORSModel.ors.Rectangle¶
-
getComputeEnergyHistogram()¶
-
getDetectorIndexFromDetectorInstanceForExecuted(detectorInstance)¶ Return the index for the detector in all selectedForExecuted detectors of the same type.
-
getDetectorsTableModel()¶
-
getDirectionIncidence()¶
-
getDistributedTaskGroupTableWidget()¶
-
getElectronSourceDistanceFromSample()¶
-
getEnergyHistogramMaximumEnergy()¶
-
getExecuteMode()¶
-
getHeightResolution()¶
-
getLabelDetails(label)¶
-
getListOfWorldCoordinates(annotationPoints)¶
-
classmethod
getMainFormClass()¶ Gets the class of the main form
Returns: output –
-
getMeshMicroscope()¶
-
getMicroscopeForSimulation()¶
-
getMultiROIDict()¶
-
getMultiROIVisualBox()¶
-
getNumberEnergyHistogramBin()¶
-
getNumberSimulatedElectronTrajectories()¶
-
getNumberSpectrumChannels()¶
-
getNumberThreadsToStart()¶
-
getRandomNumberSeed()¶
-
classmethod
getRegionEnergyLossAvailableModels()¶
-
getRegionEnergyLossModel()¶
-
getResultsBSEValuesLineData(detectorInstance)¶
-
getResultsEDSIntensitiesLineDataForMarkedLines(detectorInstance, markedElementLinesList)¶
-
getResultsEnergyHistogramLineData(listOfPoints, detectorInstance)¶ Gets the line data of the results of energy histogram and the related information.
Parameters: listOfPoints (list of tuples (x, y, z)) – list of points to plot Returns: lines – list of lines
-
getResultsSpectrumDetectedLineData(listOfPoints, detectorInstance)¶ Gets the line data of the results of spectrum detected (bremsstrahlung, characteristic and total) and the related information.
Parameters: listOfPoints (list of tuples (x, y, z)) – list of points to plot Returns: lines – list of lines
-
getRulerAnnotationGUID()¶
-
getRulerPointSpacing()¶
-
getSamplingPointsGUID()¶
-
getSelectedFaceOnClipBox(myEvent)¶
-
getSliceThicknessResolution()¶
-
getSpecifySeedNumber()¶
-
classmethod
getSpecimenElementsList(solidSimulation, timestep)¶
-
getSpecimenLabelTableModel()¶
-
getSpecimenMultiROI()¶
-
getWidthResolution()¶
-
classmethod
getXRayCSBremsstrahlungAvailableModels()¶
-
getXRayCSBremsstrahlungModel()¶
-
classmethod
getXRayCSCharacteristicAvailableModels()¶
-
getXRayCSCharacteristicModel()¶
-
classmethod
getXRayMassAbsorptionCoefficientAvailableModels()¶
-
getXRayMassAbsorptionCoefficientModel()¶
-
static
get_huey_enabled()¶
-
handleChanged(oldState, newState)¶ This method is called when the state of the application is changed.
Parameters: - oldState (str) – name of the old (previous) state
- newState (str) – name of the new (current) state
-
classmethod
importAllLoggingClasses()¶ This method is called to make any class extension available for macro playing. It should:
- import all class extension;
- return a list of classes where logging is supported.
Returns: output (list of classes) – list of classes where logging is supported by the current plugin
-
initializeMeshMicroscope()¶
-
keepAlive= False¶
-
multiple= True¶
-
onHandleChanged(oldState, newState)¶
-
orsSelectedObjectsChange()¶
-
populateDictOfSimulationParameters()¶
-
prepareForExecute(solidSimulation, timeStep)¶
-
publishResult(listDetectors, listBSEChannel, listEDSChannel)¶ Publish the result channels for BSE and EDS.
-
refreshTableModelOnSpecimenChange()¶
-
removeDetectorFromMicroscope(index)¶
-
removeMicroscopeFromXMLFile(index)¶
-
savable= False¶
-
setAccumulatorsWindowsMaximumEnergy(accumulatorsWindowsMaximumEnergy)¶
-
setAcquisitionTime(acquisitionTime)¶
-
setAngleOfIncidence(angleIncidence)¶
-
setAtomCollisionModel(atomCollisionModel)¶
-
setAtomCrossSectionModel(atomCrossSectionModel)¶
-
setAtomEnergyLossModel(atomEnergyLossModel)¶
-
setAtomMeanIonizationPotentialModel(atomMeanIonizationPotentialModel)¶
-
setAtomScreeningModel(atomScreeningModel)¶
-
setBeamCurrent(beamCurrent)¶
-
setBeamEnergy(beamEnergy)¶
-
setBeamSize(beamSize)¶
-
setChosenFaceOnBoxIndex(chosenFaceOnBoxIndex)¶
-
setComputeEnergyHistogram(computeEnergyHistogram)¶
-
setDetectorsWithComputedResults()¶
-
setDirectionIncidence(directionIncidence)¶
-
setElectronSourceDistanceFromSample(distance)¶
-
setEnergyHistogramMaximumEnergy(energyHistogramMaximumEnergy)¶
-
setExecuteMode(executeMode)¶
-
setHeightResolution(strHeightResolution)¶
-
setLabelDetails(newLabelDetails, label)¶
-
setLabelDetailsForNewSpecimen()¶
-
setMeshMicroscope(meshMicroscope)¶
-
setMicroscopeForSimulation(microscope)¶
-
setNumberEnergyHistogramBin(numberEnergyHistogramBin)¶
-
setNumberSimulatedElectronTrajectories(numberSimulatedElectronTrajectories)¶
-
setNumberSpectrumChannels(numberOfSpectrumChannel)¶
-
setPositionOfSamplingPoints()¶
-
setRandomNumberSeed(randomNumberSeed)¶
-
setRegionEnergyLossModel(regionEnergyLossModel)¶
-
setRulerAnnotationGUID(rulerGUID)¶
-
setRulerOutputPoints(outputPoints)¶
-
setSamplingPointsGUID(samplingPointsGUID)¶
-
setSliceThicknessResolution(strSliceThicknessResolution)¶
-
interfacemethod
setSolidSimulationAccumulatorsWindowsMaximumEnergy(aSolidSimulation, accumulatorsWindowsMaximumEnergy)¶ Set the simulator accumulator windows maximum xRay energy
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- accumulatorsWindowsMaximumEnergy (float) – a float
-
interfacemethod
setSolidSimulationAcquisitionTime(aSolidSimulation, acquisitionTime)¶ Set the simulator acquisition time
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- acquisitionTime (float) – a float
-
interfacemethod
setSolidSimulationAtomCollisionModel(aSolidSimulation, atomCollisionModel)¶ Set the simulator Atomic colliusion model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- atomCollisionModel (int) – a int
-
interfacemethod
setSolidSimulationAtomCrossSectionModel(aSolidSimulation, atomCrossSectionModel)¶ Set the simulator Atomic cross section model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- atomCrossSectionModel (int) – a int
-
interfacemethod
setSolidSimulationAtomEnergyLossModel(aSolidSimulation, atomEnergyLossModel)¶ Set the simulator Atomic energy loss model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- atomEnergyLossModel (int) – a int
-
interfacemethod
setSolidSimulationAtomMeanIonizationPotentialModel(aSolidSimulation, atomMeanIonizationPotentialModel)¶ Set the simulator Atomic mean ionization potential model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- atomMeanIonizationPotentialModel (int) – a int
-
interfacemethod
setSolidSimulationAtomScreeningModel(aSolidSimulation, atomScreeningModel)¶ Set the simulator Atomic screening model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- atomScreeningModel (int) – a int
-
interfacemethod
setSolidSimulationBeamCurrent(aSolidSimulation, beamCurrent)¶ Set the simulator beam current model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- beamCurrent (float) – a float
-
interfacemethod
setSolidSimulationBeamEnergy(aSolidSimulation, beamEnergy)¶ Set the simulator beam energy model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- beamEnergy (float) – a float
-
interfacemethod
setSolidSimulationComputeEnergyHistogram(aSolidSimulation, computeEnergyHistogram)¶ Set the simulator so that it simulate the energy histogram of backscattered electrons
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- computeEnergyHistogram (bool) – a bool
-
interfacemethod
setSolidSimulationComputeXRay(aSolidSimulation, computeXRay)¶ Set the simulator so that it simulate the xray emission
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- computeXRay (bool) – a bool
-
interfacemethod
setSolidSimulationElectronSourceDirection(aSolidSimulation, electronSourceDirection)¶ Set the simulator electron source direction
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- electronSourceDirection (ORSModel.ors.Vector3) – a Vector3 instance
-
interfacemethod
setSolidSimulationElectronSourceSize(aSolidSimulation, electronSourceSize)¶ Set the simulator electron source size
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- electronSourceSize (float) – a float
-
interfacemethod
setSolidSimulationEnergyHistogramMaximumEnergy(aSolidSimulation, energyHistogramMaximumEnergy)¶ Set the simulator accumulator windows maximum xRay energy
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- energyHistogramMaximumEnergy (float) – a float
-
interfacemethod
setSolidSimulationMultiROI(aSolidSimulation, multiROI, timestep)¶ Set the multiROI that will be used by the simulator
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- multiROI (ORSModel.ors.MultiROI) – a MultiROI instance
- timestep (int) – timestep of the simulation
-
interfacemethod
setSolidSimulationNumberEnergyHistogramBin(aSolidSimulation, numberEnergyHistogramBin)¶ Set the number of bins for energy histogram
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- numberEnergyHistogramBin (int) – a int
-
interfacemethod
setSolidSimulationNumberOfThread(aSolidSimulation, numberThreadsToStart)¶ Set the simulator thread count time
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- numberThreadsToStart (int) – a int
-
interfacemethod
setSolidSimulationNumberSimulatedElectronTrajectories(aSolidSimulation, numberSimulatedElectronTrajectories)¶ Set the simulator trajectory count
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- numberSimulatedElectronTrajectories (int) – a int
-
interfacemethod
setSolidSimulationNumberSpectrumChannels(aSolidSimulation, channelCount)¶ Set the simulator number of channel for xray detector
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- channelCount (int) – a int
-
interfacemethod
setSolidSimulationRandomSeedNumber(aSolidSimulation, numberRandomSeed)¶ Set the simulator trajectory count
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- numberRandomSeed (int) – a int
-
interfacemethod
setSolidSimulationRegionEnergyLossModel(aSolidSimulation, regionEnergyLossModel)¶ Set the simulator region energy loss model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- regionEnergyLossModel (int) – a int
-
interfacemethod
setSolidSimulationXRayCSBremsstrahlungModel(aSolidSimulation, xRayCSBremsstrahlungModel)¶ Set the simulator xRay Collision Bremsstrahlung model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- xRayCSBremsstrahlungModel (int) – a int
-
interfacemethod
setSolidSimulationXRayCSCharacteristicModel(aSolidSimulation, xRayCSCharacteristicModel)¶ Set the simulator xRay Collision characteristic model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- xRayCSCharacteristicModel (int) – a int
-
interfacemethod
setSolidSimulationXRayMassAbsorptionCoefficientModel(aSolidSimulation, xRayMassAbsorptionCoefficientModel)¶ Set the simulator XRay mass absorption model
Parameters: - aSolidSimulation (transient SolidSimulation) – new SolidSimulation instance
- xRayMassAbsorptionCoefficientModel (int) – a int
-
setSpecifySeedNumber(isSpecified)¶
-
setSpecimenMultiROI(aMultiROI, timestep)¶
-
setWidthResolution(strWidthResolution)¶
-
setXRayCSBremsstrahlungModel(xRayCSBremsstrahlungModel)¶
-
setXRayCSCharacteristicModel(xRayCSCharacteristicModel)¶
-
setXRayMassAbsorptionCoefficientModel(xRayMassAbsorptionCoefficientModel)¶
-
showClipBox()¶
-
stateDescriptors= [<ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>]¶
-
classmethod
toolsMenu()¶
-
updateDetectorsTableModel()¶
-
updateMeshWithAngleOfIncidence()¶
-
updateMicroscopeInformation(index)¶
-
updateOutputHeight(strHeightResolution)¶
-
updateOutputWidth(strWidthResolution)¶
-
updateRulerPointSpacingValue(outputPoints)¶
-
updateSubsetDimensions(timestep=0)¶
-
updateTotalImages(strSliceThickness)¶
-
updateUI()¶
-
updateXMLFile()¶
-
validateLabelDetails()¶
-
validateSimulationInputs()¶
-