PyJEM.eds.analysis

PyJEM.eds.analysis.get_analysis_settings()

Gets the settings for analyzing.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

UserCategories

list[str]

List of standard data categories created by the user.

DisableElements

dict

Dictionary containing a list of disabled element atomic numbers.

QualitativeSensitivity

str

Sensitivity for qualitative analysis. One of "Low", "Middle", or "High".

ZAFEnable

bool

True: ZAF correction enabled.

PRZEnable

bool

True: PRZ correction enabled.

CliffLorimer

bool

True: Cliff-Lorimer correction enabled.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_analysis_settings()
{
    "CliffLorimer": True,
    "DisableElements": {
        "ElementalNumber": [
            1,
            2,
            3,
            4,
            10,
            18,
            36,
            43,
            54,
            61,
            84,
            85,
            86,
            87,
            88,
            89,
            91,
            93,
            94,
            95,
            96,
            97,
            98,
            99,
            100,
            101,
            102,
            103
        ]
    },
    "PRZEnable": True,
    "QualitativeSensitivity": "Middle",
    "UserCategories": [],
    "Version": "2.0",
    "ZAFEnable": True
}
PyJEM.eds.analysis.get_analysis_status()

Gets the status of execution.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

ExecutingAnalysis

bool

True if analysis is currently in progress.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_analysis_status()
{'Version': '2.0', 'ExecutingAnalysis': False}
PyJEM.eds.analysis.execute_autoqualitative_analysis(param)

Executes auto qualitative analysis.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

Elements

dict

Dictionary containing a list of detected atomic numbers under the key "ElementalNumber".

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.execute_autoqualitative_analysis({
...     "TargetDataID": "49402239-824b-41e4-b7a5-ebe18b658465",
...     "TargetDetector": 0
... })
{
    "Elements": {
        "ElementalNumber": [
            31,
            78,
            82
        ]
    },
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_quantitative_spectrum_analysis_settings()

Gets the settings of quantitative spectrum analysis.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

EnableAbsorptionCorrection

bool

True: Enable absorption correction. Available in Cliff-Lorimer mode.

Thickness

int

Sample thickness in nm. Available when CorrectionType is Cliff-Lorimer and EnableAbsorptionCorrection is True.

Density

float

Sample density in g/cm³. Available when CorrectionType is Cliff-Lorimer and EnableAbsorptionCorrection is True.

EnableFluorescenceCorrection

bool

True: Enable fluorescence correction. Available in Cliff-Lorimer mode.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_quantitative_spectrum_analysis_settings()
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "Density": 2.3299999237060547,
    "EnableAbsorptionCorrection": False,
    "EnableFluorescenceCorrection": False,
    "OxideCation": 24,
    "StandardDataType": 2,
    "Thickness": 100,
    "Version": "2.0"
}
PyJEM.eds.analysis.set_quantitative_spectrum_analysis_settings(param)

Sets the settings of quantitative spectrum analysis.

Parameters:

param (dict) –

Quantitative spectrum analysis settings payload.

key

type

value

Version

str

API version string.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

EnableAbsorptionCorrection

bool

True: Enable absorption correction. Available in Cliff-Lorimer mode.

Thickness

int

Sample thickness in nm. Available when CorrectionType is Cliff-Lorimer and EnableAbsorptionCorrection is True.

Density

float

Sample density in g/cm³. Available when CorrectionType is Cliff-Lorimer and EnableAbsorptionCorrection is True.

EnableFluorescenceCorrection

bool

True: Enable fluorescence correction. Available in Cliff-Lorimer mode.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

Returns:

Corresponds to get_quantitative_spectrum_analysis_settings().

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.set_quantitative_spectrum_analysis_settings({
...     "ConversionType": 1,
...     "CorrectionType": 3,
...     "Density": 2.3299999237060547,
...     "EnableAbsorptionCorrection": False,
...     "EnableFluorescenceCorrection": False,
...     "OxideCation": 24,
...     "StandardDataType": 2,
...     "Thickness": 100,
...     "Version": "2.0"
... })
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "Density": 2.3299999237060547,
    "EnableAbsorptionCorrection": False,
    "EnableFluorescenceCorrection": False,
    "OxideCation": 24,
    "StandardDataType": 2,
    "Thickness": 100,
    "Version": "2.0"
}
PyJEM.eds.analysis.execute_quantitative_spectrum_analysis(param)

Executes quantitative spectrum analysis.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

Quantities

list[float]

Array of elemental quantities in Mass%.

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.execute_quantitative_spectrum_analysis({
...     "TargetDataID": "xxxx-xxxx-xxxx-xxxx",
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDetector": 1
... })
{
    "Message": "",
    "Quantities": [
        100,
        0,
        0
    ],
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.extract_line_spectrum(param)

Extracts the ID of spectrum data of line analysis.

Parameters:

param (dict) –

Request payload.

key

type

value

TargetDataID

str

Dataset ID.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

SpectrumDataID

str

ID of the extracted line spectrum.

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.extract_line_spectrum({"TargetDataID": "ed8c008a-ee32-4e03-a01e-e586c21f2591"})
{
    "Message": "",
    "Result": "OK",
    "SpectrumDataID": "bbbda4db-bd52-4bf0-9e35-c2819c86bad0",
    "Version": "2.0"
}
PyJEM.eds.analysis.extract_area_spectrum(param)

Extracts the ID of spectrum data of area analysis.

Parameters:

param (dict) –

Request payload.

key

type

value

TargetDataID

str

Dataset ID.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

SpectrumDataID

str

ID of the extracted area spectrum.

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.extract_area_spectrum({"TargetDataID": "ed8c008a-ee32-4e03-a01e-e586c21f2591"})
{
    "Message": "",
    "Result": "OK",
    "SpectrumDataID": "bbbda4db-bd52-4bf0-9e35-c2819c86bad0",
    "Version": "2.0"
}
PyJEM.eds.analysis.execute_count_line_analysis(param)

Executes gross count data of line analysis.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.execute_count_line_analysis({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "ed8c008a-ee32-4e03-a01e-e586c21f2591",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "636b94cb-0a8e-45d8-9870-e682324ffd39",
        "9df5b300-4418-4933-a9e0-6396f71ab857",
        "318df351-ab6a-47c5-b5d6-d422b24beee9",
        "702c9aea-84d6-4adb-a4ec-2b029943a8b5"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_net_count_line_analysis_settings()

Gets the settings of net count line analysis.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of standard data. If StandardDataType is NORM, returns nothing; if COMMON, returns "Common"; if USER, returns the configured string.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_net_count_line_analysis_settings()
{
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.set_net_count_line_analysis_settings(param)

Sets the settings of net count line analysis.

Parameters:

param (dict) –

Net count line analysis settings payload.

key

type

value

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available exclusively when StandardDataType is USER.

Returns:

Corresponds to get_net_count_line_analysis_settings().

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.set_net_count_line_analysis_settings({
...     "ProcessingMethod": 1,
...     "StandardDataType": 2,
...     "Version": "2.0"
... })
{
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.execute_net_count_line_analysis(param)

Executes net count data of line analysis.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.execute_net_count_line_analysis({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "ed8c008a-ee32-4e03-a01e-e586c21f2591",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "636b94cb-0a8e-45d8-9870-e682324ffd39"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_quantitative_line_analysis_settings()

Gets the settings of quantitative line analysis.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

EnableSumPeakRemoval

bool

True: Enable sum peak removal.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_quantitative_line_analysis_settings()
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "EnableSumPeakRemoval": False,
    "OxideCation": 24,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.set_quantitative_line_analysis_settings(param)

Sets the settings of quantitative line analysis.

Parameters:

param (dict) –

Quantitative line analysis settings payload.

key

type

value

Version

str

API version string.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

EnableSumPeakRemoval

bool

True: Enable sum peak removal.

Returns:

Corresponds to get_quantitative_line_analysis_settings().

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.set_quantitative_line_analysis_settings({
...     "ConversionType": 1,
...     "CorrectionType": 3,
...     "EnableSumPeakRemoval": False,
...     "OxideCation": 24,
...     "ProcessingMethod": 1,
...     "StandardDataType": 2,
...     "Version": "2.0"
... })
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "EnableSumPeakRemoval": False,
    "OxideCation": 24,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.execute_quantitative_line_analysis(param)

Executes quantitative data of line analysis.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.execute_quantitative_line_analysis({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "ed8c008a-ee32-4e03-a01e-e586c21f2591",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "636b94cb-0a8e-45d8-9870-e682324ffd39"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.create_count_map(param)

Creates gross count mapping data.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.create_count_map({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "630a8daa-08f2-4298-bec9-92ce2e89ea7d",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "3a04ea36-d080-46b3-8d2d-c8b4300d54b1",
        "6fee5578-6986-4f34-9445-1c89a598f97a",
        "268d43a8-4f64-4ed5-a75b-a960c42d6e37",
        "1a4206b3-317c-4cd7-9093-82557ac4c0c3",
        "134b497a-c9f9-40e2-be63-28983597ca21",
        "f9cb63cf-2c7e-420f-87b0-7b1321ad4dae"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_net_count_map_analysis_settings()

Gets the settings of net count mapping.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

PixelWidth

int

Width in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image width.

PixelHeight

int

Height in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image height.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

Smoothing

int

Gaussian filter range. 0: None, 1: 3×3, 2: 5×5, 3: 7×7.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is USER.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_net_count_map_analysis_settings()
{
    "PixelHeight": 0,
    "PixelWidth": 0,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.set_net_count_map_analysis_settings(param)

Sets the settings of net count mapping.

Parameters:

param (dict) –

Net count map analysis settings payload.

key

type

value

PixelWidth

int

Width in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image width.

PixelHeight

int

Height in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image height.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External.

Smoothing

int

Gaussian filter range. 0: None, 1: 3×3, 2: 5×5, 3: 7×7.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is USER.

Returns:

Corresponds to get_net_count_map_analysis_settings().

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.set_net_count_map_analysis_settings({
...     "PixelHeight": 0,
...     "PixelWidth": 0,
...     "ProcessingMethod": 1,
...     "StandardDataType": 2,
...     "Version": "2.0"
... })
{
    "PixelHeight": 0,
    "PixelWidth": 0,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.create_net_count_map(param)

Creates net count mapping data.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.create_net_count_map({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "630a8daa-08f2-4298-bec9-92ce2e89ea7d",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "00520849-3e58-4c6c-9baa-ed3e1ca78161",
        "70ee93fa-b69f-4b54-9d92-a958d7d1d16a",
        "aa11153a-80b4-46b1-acd5-3dd209992a33",
        "d3b85b80-c8fd-43fe-a9c7-22c36f68d2d7"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_quantitative_map_analysis_settings()

Gets the settings of quantitative mapping.

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

EnableSumPeakRemoval

bool

True: Enable sum peak removal.

PixelWidth

int

Width in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image width.

PixelHeight

int

Height in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image height.

Smoothing

int

Gaussian filter range. 0: None, 1: 3×3, 2: 5×5, 3: 7×7.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_quantitative_map_analysis_settings()
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "EnableSumPeakRemoval": False,
    "PixelHeight": 0,
    "PixelWidth": 0,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.set_quantitative_map_analysis_settings(param)

Sets the settings of quantitative mapping.

Parameters:

param (dict) –

Quantitative map analysis settings payload.

key

type

value

Version

str

API version string.

ProcessingMethod

int

Processing method. 0: None, 1: Speed, 2: Precise. Speed and Precise are supported.

StandardDataType

int

Standard data type. 0: None, 1: DEFSPC, 2: NORM, 3: COMMON, 4: USER, 5: External. NORM, COMMON and USER are supported.

UserCategoryName

str

Category name of the standard data. Available when StandardDataType is 4 (USER).

CorrectionType

int

Correction type. 0: None, 1: ZAF, 2: PRZ, 3: Cliff-Lorimer, 4: ZETA. ZAF, PRZ and Cliff-Lorimer are supported.

ConversionType

int

Conversion type. 0: None, 1: Metal, 2: Oxide, 3: Compound. Metal and Oxide are available.

OxideCation

int

Cation number of the oxide. Available in oxide conversion mode.

EnableSumPeakRemoval

bool

True: Enable sum peak removal.

PixelWidth

int

Width in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image width.

PixelHeight

int

Height in pixels. Select from [64, 128, 256, 512, 1024, 2048, 4096]. Must be less than or equal to the original image height.

Smoothing

int

Gaussian filter range. 0: None, 1: 3×3, 2: 5×5, 3: 7×7.

Returns:

Corresponds to get_quantitative_map_analysis_settings().

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.set_quantitative_map_analysis_settings({
...     "ConversionType": 1,
...     "CorrectionType": 3,
...     "EnableSumPeakRemoval": False,
...     "PixelHeight": 0,
...     "PixelWidth": 0,
...     "ProcessingMethod": 1,
...     "StandardDataType": 2,
...     "Version": "2.0"
... })
{
    "ConversionType": 1,
    "CorrectionType": 3,
    "EnableSumPeakRemoval": False,
    "PixelHeight": 0,
    "PixelWidth": 0,
    "ProcessingMethod": 1,
    "StandardDataType": 2,
    "Version": "2.0"
}
PyJEM.eds.analysis.create_quantitative_map(param)

Creates quantitative mapping data.

Parameters:

param (dict) –

Analysis request payload.

key

type

value

TargetDataID

str

Dataset ID.

Elements

list[dict]

List of elements for analysis. ⇒ See Elements items.

TargetDetector

int

Target detector. 0: Total, 1: FirstDetector, 2: SecondDetector, 3: ThirdDetector, 4: FourthDetector.

Elements items

key

type

value

ElementalNumber

int

Atomic number.

Line

str

One of "None", "K", "L", "M", "N", "O", or "Default".

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Message

str

Free text message from the EDS system.

DataIDs

list[str]

List of result data IDs.

Example:

["aaaa-aaaa-aaaa-aaaa", "bbbb-bbbb-bbbb-bbbb"]

Result

str

Execution status. One of "OK" or "Fail".

Return type:

dict

Notes

If the error "The target data ID is invalid." is displayed, verify the type of the dataset specified by TargetDataID.

Examples

>>> from PyJEM import eds
>>> eds.create_quantitative_map({
...     "Elements": [
...         {"ElementalNumber": 8, "Line": "K"},
...         {"ElementalNumber": 14, "Line": "L"},
...         {"ElementalNumber": 21, "Line": "L"}
...     ],
...     "TargetDataID": "630a8daa-08f2-4298-bec9-92ce2e89ea7d",
...     "TargetDetector": 1
... })
{
    "DataIDs": [
        "ef4bd1fc-60c9-4b25-9963-4fba5d156f0c",
        "99876b2e-dcb0-4fb1-b7ce-b846fed31b09",
        "01cf6319-352c-435a-8409-ce5650c692a4"
    ],
    "Message": "",
    "Result": "OK",
    "Version": "2.0"
}
PyJEM.eds.analysis.get_map_image_size(param)

Gets width and height of an acquired map image.

Parameters:

param (dict) –

Request payload.

key

type

value

TargetDataID

str

An ID returned as DataIDs by create_count_map(), create_net_count_map(), or create_quantitative_map().

Returns:

The returned value is a dictionary. A description of each item is provided below.

key

type

value

Version

str

API version string.

Width

int

Width of the acquired map image in pixels.

Height

int

Height of the acquired map image in pixels.

Return type:

dict

Examples

>>> from PyJEM import eds
>>> eds.get_map_image_size({"TargetDataID": "630a8daa-08f2-4298-bec9-92ce2e89ea7d"})
{
    "Height": 204,
    "Version": "2.0",
    "Width": 176
}