pymcxray.FileFormat package

Subpackages

Submodules

pymcxray.FileFormat.Element module

MCXRay element input file.

class pymcxray.FileFormat.Element.Element(atomicNumber=0, massFraction=1.0)[source]

Bases: object

atomicNumber
createLineOldVersion()[source]
createLinesWithKey()[source]
extractFromLineOldVersion(line)[source]
extractFromLinesWithKey(lines)[source]
massFraction
name

pymcxray.FileFormat.ExportedSpectrum module

Read and write exported spectrum from McXRay.

class pymcxray.FileFormat.ExportedSpectrum.ExportedSpectrum[source]

Bases: object

getData()[source]
getSpectrumType()[source]
read(filepath)[source]

pymcxray.FileFormat.FileReaderWriterTools module

description

pymcxray.FileFormat.FileReaderWriterTools.reduceAfterDot(value)[source]

pymcxray.FileFormat.MCXRayModel module

Model type used in MCXRay.

class pymcxray.FileFormat.MCXRayModel.AtomCollisionModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BROWNING = 1
TYPE_GAUVIN = 2
TYPE_RUTHERFORD = 0
class pymcxray.FileFormat.MCXRayModel.AtomCollisionScreeningModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_HENOC_MAURICE = 0
class pymcxray.FileFormat.MCXRayModel.AtomCrossSectionModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BROWNING = 0
TYPE_GAUVIN_DROUIN = 1
class pymcxray.FileFormat.MCXRayModel.AtomCrossSectionScreeningModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_HENOC_MAURICE = 0
class pymcxray.FileFormat.MCXRayModel.AtomElectronRangeModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_KANAYA_OKAYAMA = 0
class pymcxray.FileFormat.MCXRayModel.AtomEnergyLossModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BETHE = 0
class pymcxray.FileFormat.MCXRayModel.AtomMeanIonizationPotentialModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_JOY_LUO = 0
class pymcxray.FileFormat.MCXRayModel.AtomScreeningModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_HENOC_MAURICE = 0
class pymcxray.FileFormat.MCXRayModel.MCXRayModel(currentModel=None)[source]

Bases: object

getModel()[source]
setModel(modelType)[source]
setModelFromString(text)[source]
class pymcxray.FileFormat.MCXRayModel.MassAbsorptionCoefficientModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_CHANTLER2005 = 3
TYPE_HEINRICH_DATA = 1
TYPE_HEINRICH_PARAMETERIZATION = 2
TYPE_HENKE = 0
class pymcxray.FileFormat.MCXRayModel.RegionEnergyLossModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BETHE = 1
TYPE_BETHE_JOY_LUO = 0
TYPE_BETHE_RELATIVISTIC = 2
TYPE_JOY_LUO_KGAUVIN = 3
TYPE_JOY_LUO_MONSEL = 4
class pymcxray.FileFormat.MCXRayModel.SampleEnergyLossModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BETHE_JOY_LUO = 0
class pymcxray.FileFormat.MCXRayModel.SpectrumInterpolationModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_COPY = 0
TYPE_LINEAR = 1
TYPE_LINEAR_DOUBLE = 2
TYPE_SPLINE = 3
TYPE_SPLINE_BATCH = 4
TYPE_SPLINE_POINT = 5
class pymcxray.FileFormat.MCXRayModel.XRayCSBremsstrahlungModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BETHE_HEITLER = 0
TYPE_DING = 2
TYPE_GAUVIN = 3
TYPE_KIRKPATRICK_WIEDMAN = 1
class pymcxray.FileFormat.MCXRayModel.XRayCSCharacteristicModel(currentModel=None)[source]

Bases: pymcxray.FileFormat.MCXRayModel.MCXRayModel

TYPE_BOTE2009 = 1
TYPE_CASTANI1982 = 0

pymcxray.FileFormat.MicroscopeParameters module

MCXRay microscope parameters input file.

class pymcxray.FileFormat.MicroscopeParameters.MicroscopeParameters[source]

Bases: object

beamCurrent_A
beamDiameter_A
beamEnergy_keV
beamPositionX_A
beamPositionY_A
beamStandardDeviation_A
beamTilt_deg
defaultValues()[source]
detectorAzimuthalAngle_deg
detectorBFHigh_rad
detectorBFLow_rad
detectorChannelWidth_eV
detectorCrystalAtomSymbol
detectorCrystalDistance_cm
detectorCrystalRadius_cm
detectorCrystalThickness_cm
detectorDFHigh_rad
detectorDFLow_rad
detectorDeadLayer_A
detectorDiffusionLenght_A
detectorHAADFHigh_rad
detectorHAADFLow_rad
detectorNoise_eV
detectorPitch_deg
detectorSurfaceQuality
detectorTOA_deg
read(filepath)[source]
time_s
version
write(filepath)[source]

pymcxray.FileFormat.Models module

MCXRay models file.

class pymcxray.FileFormat.Models.Models[source]

Bases: object

getModelList()[source]
modelAtomCollision
modelAtomCrossSection
modelAtomMac
modelSampleEnergyLoss
modelXrayBremsstrahlung
modelXrayCharacteristic
read(filepath)[source]
version
write(filepath)[source]

pymcxray.FileFormat.Region module

MCXRay region input file.

class pymcxray.FileFormat.Region.Region[source]

Bases: object

clear()[source]
createLinesWithVersion()[source]
createLinesWithoutVersion()[source]
extractFromLinesWithVersion(lines)[source]
extractFromLinesWithoutVersion(lines)[source]

pymcxray.FileFormat.RegionDimensions module

MCXRay region dimensions input file.

class pymcxray.FileFormat.RegionDimensions.RegionDimensions(parameters=None)[source]

Bases: object

createLineOldVersion()[source]
createLineWithKey()[source]
extractFromLineOldVersion(line)[source]
extractFromLinesWithKey(line)[source]
getLineFormat()[source]
class pymcxray.FileFormat.RegionDimensions.RegionDimensionsBox(parameters=None)[source]

Bases: pymcxray.FileFormat.RegionDimensions.RegionDimensions

getLineFormat()[source]
maximumX
maximumY
maximumZ
minimumX
minimumY
minimumZ
class pymcxray.FileFormat.RegionDimensions.RegionDimensionsCylinder(parameters=None)[source]

Bases: pymcxray.FileFormat.RegionDimensions.RegionDimensionsSphere

directionX
directionY
directionZ
getLineFormat()[source]
length
class pymcxray.FileFormat.RegionDimensions.RegionDimensionsSphere(parameters=None)[source]

Bases: pymcxray.FileFormat.RegionDimensions.RegionDimensions

getLineFormat()[source]
positionX
positionY
positionZ
radius
pymcxray.FileFormat.RegionDimensions.createRegionDimensions(regionType)[source]

pymcxray.FileFormat.RegionType module

MCXRay region type input file.

pymcxray.FileFormat.ResultsParameters module

MCXRay ResultsParameters input file.

class pymcxray.FileFormat.ResultsParameters.ResultsParameters[source]

Bases: object

defaultValues()[source]
isComputeXrayBremsstrahlung
isComputeXrayCharacteristic
isComputeXrayPhirhoz
isComputeXraySimulatedSpectrum
read(filepath)[source]
version
write(filepath)[source]

pymcxray.FileFormat.SimulationInputs module

MCXRay simulation inputs file.

class pymcxray.FileFormat.SimulationInputs.SimulationInputs[source]

Bases: object

getExtension(key)[source]
mapFilename
microsopeFilename
modelFilename
read(filepath)[source]
resultParametersFilename
simulationParametersFilename
snrFilename
specimenFilename
title
version
write(filepath)[source]

pymcxray.FileFormat.SimulationParameters module

MCXRay simulation parameters input file.

class pymcxray.FileFormat.SimulationParameters.SimulationParameters[source]

Bases: object

baseFilename
defaultValues()[source]
elasticCrossSectionScalingFactor
energyChannelWidth_eV
energyLossScalingFactor
numberChannels
numberElectrons
numberFilmsX
numberFilmsY
numberFilmsZ
numberPhotons
numberWindows
read(filepath)[source]
spectrumInterpolationModel
version
voxelSimplification
write(filepath)[source]

pymcxray.FileFormat.SnrParameters module

MCXRay Snr input file.

class pymcxray.FileFormat.SnrParameters.SnrParameters[source]

Bases: object

backgroundEnergyWindowsSize
defaultValues()[source]
energyEnd_keV
energyStart_keV
numberEnergySteps
read(filepath)[source]
snrType
spectrumEnergyWindowsSize
write(filepath)[source]

pymcxray.FileFormat.Specimen module

MCXRay specimen input file.

class pymcxray.FileFormat.Specimen.Specimen[source]

Bases: object

clear()[source]
name
numberRegions
read(filepath)[source]
regions
version
write(filepath)[source]

pymcxray.FileFormat.Version module

MCXray version information.

class pymcxray.FileFormat.Version.Version(major, minor, revision)[source]

Bases: object

fromString(versionString)[source]
key = 'Version'
major
minor
readFromFile(filepath)[source]
revision
toString()[source]
writeLine(outputFile)[source]

pymcxray.FileFormat.testUtilities module

Utilities used for testing this package.

pymcxray.FileFormat.testUtilities.createTempDataPath(path)[source]
pymcxray.FileFormat.testUtilities.getSimulationTitles()[source]
pymcxray.FileFormat.testUtilities.removeTempDataPath(path)[source]

pymcxray.FileFormat.test_Element module

Tests for module Element.

class pymcxray.FileFormat.test_Element.TestElement(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module Element.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_createLineOldVersion()[source]

Tests for method createLineOldVersion.

test_createLineWithKey()[source]

Tests for method createLineOldVersion.

test_extractFromLineOldVersion()[source]

Tests for method extractFromLineOldVersion.

test_extractFromLineWithKey()[source]

Tests for method extractFromLinesWithKey.

pymcxray.FileFormat.test_ExportedSpectrum module

Tests for module ExportedSpectrum.

class pymcxray.FileFormat.test_ExportedSpectrum.TestExportedSpectrum(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module moduleName.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_read()[source]

Tests for method read.

pymcxray.FileFormat.test_FileReaderWriterTools module

Tests for the module FileReaderWriterTools.

class pymcxray.FileFormat.test_FileReaderWriterTools.TestFileReaderWriterTools(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module FileReaderWriterTools.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test__reduceAfterDot()[source]

Tests for method reduceAfterDot.

pymcxray.FileFormat.test_MCXRayModel module

Tests for module MCXRayModel.

class pymcxray.FileFormat.test_MCXRayModel.TestMCXRayModel(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module MCXRayModel.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_MCXRayModel()[source]

Tests for method MCXRayModel.

pymcxray.FileFormat.test_MicroscopeParameters module

pymcxray.FileFormat.test_Models module

pymcxray.FileFormat.test_Region module

Tests for module Region.

class pymcxray.FileFormat.test_Region.TestRegion(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module moduleName.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

getTestRegionLinesWithVersion(title, userMassDensity=True)[source]
getTestRegionLinesWithoutVersion(title, userMassDensity=True)[source]
setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_createLinesWithVersion()[source]

Tests for method createLinesWithVersion.

test_createLinesWithoutVersion()[source]

Tests for method createLinesWithoutVersion.

test_extractFromLinesWithVersion()[source]

Tests for method read.

test_extractFromLinesWithoutVersion()[source]

Tests for method read.

pymcxray.FileFormat.test_RegionDimensions module

Tests for module RegionDimensions.

class pymcxray.FileFormat.test_RegionDimensions.TestRegionDimensions(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module RegionDimensions.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_RegionDimensionsBox_createLineOldVersion()[source]

Tests for class RegionDimensionsBox.

test_RegionDimensionsBox_createLineWithKey()[source]

Tests for class RegionDimensionsBox.

test_RegionDimensionsBox_extractFromLineOldVersion()[source]

Tests for class RegionDimensionsBox.

test_RegionDimensionsBox_extractFromLinesWithKey()[source]

Tests for class RegionDimensionsBox.

test_RegionDimensionsCylinder_createLineOldVersion()[source]

Tests for class RegionDimensionsCylinder.

test_RegionDimensionsCylinder_createLineWithKey()[source]

Tests for class RegionDimensionsCylinder.

test_RegionDimensionsCylinder_extractFromLineOldVersion()[source]

Tests for class RegionDimensionsCylinder.

test_RegionDimensionsCylinder_extractFromLinesWithKey()[source]

Tests for class RegionDimensionsCylinder.

test_RegionDimensionsSphere_createLineOldVersion()[source]

Tests for class RegionDimensionsSphere.

test_RegionDimensionsSphere_createLineWithKey()[source]

Tests for class RegionDimensionsSphere.

test_RegionDimensionsSphere_extractFromLineOldVersion()[source]

Tests for class RegionDimensionsSphere.

test_RegionDimensionsSphere_extractFromLinesWithKey()[source]

Tests for class RegionDimensionsSphere.

test_createRegionDimensions()[source]

Tests for method createRegionDimensions.

pymcxray.FileFormat.test_RegionType module

Test for module RegionType.

class pymcxray.FileFormat.test_RegionType.TestRegionType(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module RegionType.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_Constants()[source]

Tests for method Constants.

pymcxray.FileFormat.test_ResultsParameters module

pymcxray.FileFormat.test_SimulationInputs module

pymcxray.FileFormat.test_SimulationParameters module

pymcxray.FileFormat.test_SnrParameters module

Tests for the module SnrParameters.

class pymcxray.FileFormat.test_SnrParameters.TestSnrParameters(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module SnrParameters.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

getSnrParametersReference(title)[source]
setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test__createKeys()[source]

Tests for method _createKeys.

test_read()[source]

Tests for method read.

test_write()[source]

Tests for method write.

pymcxray.FileFormat.test_Specimen module

pymcxray.FileFormat.test_Version module

Tests for module Version.

class pymcxray.FileFormat.test_Version.TestVersion(methodName='runTest')[source]

Bases: unittest.case.TestCase

TestCase class for the module Version.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Setup method.

tearDown()[source]

Teardown method.

testSkeleton()[source]

First test to check if the testcase is working with the testing framework.

test_VersionConstants()[source]

Tests for method VersionConstants.

test_comparison()[source]

Test comparison operation on Version class.

test_fromString()[source]

Tests for method fromString.

test_readFromFile()[source]

Tests for method readFromFile.

test_readFromFile_BadFile()[source]

Tests for method readFromFile.

test_toString()[source]

Tests for method toString.

test_writeLine()[source]

Tests for method writeLine.

pymcxray.FileFormat.tests module

Module contents