how to get the length scale, length unit, energy scale and energy unit from a EELS map data by DM script

Viewed 57

enter image description hereI want to get length scale, length unit, energy scale, and energy unit from an EELS map data by DM script

 source.ImageGetDimensionCalibration(0, sOrig, sScale, sUnit, 0)
source.ImageGetDimensionCalibration(2, eOrig, eScale, eUnit, 0)

The above codes did not work, it always make the energy unit with 1eV

For example, an EELS data with dispersion 0.9 ev/pixel, or 0.5 ev/pixel, and the energy range from 0 to 400, and the EELS map is 10nm x8nm, I need to get all this information with DM script.

Now the bug of my code is it always count the disepersion is 1 ev/pixel

Any suggestions, thanks

1 Answers

The following script will hopefully clear up any questions:

void PrintCalibrations(image source)
{
    number nDim = source.ImageGetNumDimensions()
    result("\n '[" + source.ImageGetLabel() +"]:"+ source.ImageGetName() +"' calibrations:")
    result("\n Data has " + nDim + " dimensions.")
    for( number d=0; d<nDim; d++ )
    {
        string unit_dim
        number scale_dim, origin_dim
        source.ImageGetDimensionCalibration(d, origin_dim, scale_dim, unit_dim, 0)
        result("\n\t Dimension #"+d+": scale = "  + scale_dim + " \t origin = " + origin_dim + " \t [" + unit_dim + "]" )
    }
}

// Pick your data by image letter!
Image SIdata_3D := B
Image PickerSpectrum_1D := A
Image elementalMap_2D := D

ClearResults()
PickerSpectrum_1D.PrintCalibrations()
elementalMap_2D.PrintCalibrations()
SIdata_3D.PrintCalibrations()

Applied to a test data set: Example

Related