Skip to content

20.1. Built‐in functions

Yusuke SETO edited this page Apr 11, 2025 · 66 revisions

ReciPro.File

Function name description
ReciPro.File.GetFileName() Get a file name by a selection dialog. The returned string is a full path of the selected file.
ReciPro.File.GetFileNames() Get file names by a selection dialog. Multiple selections are possible. The returned value is a string array, each of which is a full path of selected files.
ReciPro.File.GetDirectoryPath(string filename) Get a directory path. the returned string is a full path to the filename. If "filename" is omitted, a selection dialog will open.
ReciPro.File.ReadCrystalList(string filename) Read a crystal list file (xml format). If 'filename' is omitted, a selection dialog will open.
ReciPro.File.ReadCrystal(string filename) Read a crystal (CIF- or AMC-format only). If 'filename' is omitted, a selection dialog will open.
ReciPro.File.ExportAsCIF(string filename) Export a selected crystal as CIF format. If 'filename' is omitted, a selection dialog will open.

ReciPro.Crystal

Function name description
ReciPro.Crystal.Name String. Get the name of the selected crystal.
ReciPro.Crystal.ChemicalFormula String. Get the name of the selected crystal.
ReciPro.Crystal.Density Float. Get the density (g/cm^3) of the selected crystal.

ReciPro.CrystalList

Function name description
ReciPro.CrystalList.SelectedIndex Integer. Set/get the index (integer value) of the selected crystal in the list.
ReciPro.CrystalList.Add() Add the crystal at 'Crystal Information' to the end of the list.
ReciPro.CrystalList.Replace() Replace the crystal at 'Crystal Information' with the crystal selected in the list.
ReciPro.CrystalList.Delete() Delete the selected crystal in the list.
ReciPro.CrystalList.ClearAll() Delete all crystals in the list.
ReciPro.CrystalList.MoveUp() Move up the selected crystal in the list.
ReciPro.CrystalList.MoveDown() Move down the selected crystal in the list.

ReciPro.Dir

Set the rotation state by Euler angles.

Function name description
ReciPro.Dir.Euler(float phi, float theta, float psi) Set the rotation state by three Euler angles (in radians).
ReciPro.Dir.EulerInDegree(float phi, float theta, float psi) Set the rotation state by three Euler angles (in degrees).

Rotate by a specific axis.

Function name description
ReciPro.Dir.Rotate(float vX, float vY, float vZ, float angle) Rotate the current crystal by specifying the rotation axis (vX, vY, vZ) and angle (in radians).
ReciPro.Dir.RotateInDeg(float vX, float vY, float vZ, float angle) Rotate the current crystal by specifying the rotation axis (vX, vY, vZ) and angle (in degrees).
ReciPro.Dir.RotateAroundAxis(int u, int v, int w, float angle) Rotate the current crystal with the crystal axis (uvw) as the rotation axis (in radians).
ReciPro.Dir.RotateAroundAxisInDeg(int u, int v, int w, float angle) Rotate the current crystal with the crystal axis (uvw) as the rotation axis (in degrees).
ReciPro.Dir.RotateAroundPlane(int h, int k, int l, float angle) Rotate the current crystal with the crystal plane (hkl) as the rotation axis (in radians).
ReciPro.Dir.RotateAroundPlaneInDeg(int h, int k, int l, float angle) Rotate the current crystal with the crystal plane (hkl) as the rotation axis (in degrees).

Project along a specific direction.

Function name description
ReciPro.Dir.ProjectAlongAxis(int u, int v, int w) Rotate the current crystal so that the specified axis (uvw) is normal to the screen.
ReciPro.Dir.ProjectAlongPlane(int h, int k, int l) Rotate the current crystal so that the specified plane (hkl) is normal to the screen.

ReciPro.DifSim

Open, Close

Function name description
ReciPro.DifSim.Open() Open the 'Diffraction Simulator' window.
ReciPro.DifSim.Close() Close the 'Diffraction Simulator' window.

Wave source

Function name description
ReciPro.DifSim.Source_Xray() Set the incident wave to X-ray.
ReciPro.DifSim.Source_Electron() Set the incident wave to electron.
ReciPro.DifSim.Source_Neutron() Set the incident wave to neutron.
ReciPro.DifSim.Energy Float. Set/Get the energy of the incident beam. The units for X-ray and electron are keV, and for neutron is meV.
ReciPro.DifSim.Wavelength Float. Set/Get the wavelength (in nm) of the incident beam.

Beam

Function name description
ReciPro.DifSim.Beam_Parallel() Set the incident wave to a parallel beam.
ReciPro.DifSim.Beam_PrecessionXray() Set the incident X-ray to a precession beam.
ReciPro.DifSim.Beam_PrecessionElectron() Set the incident electron to a precession beam.
ReciPro.DifSim.Beam_Convergence() Set the incident electron to a convergent beam.

Sample properties

Function name description
ReciPro.DifSim.Thickness Float. Set/Get the sample thickness.

Detector geometries

Function name description
ReciPro.DifSim.CameraLength2 Float. Set/Get the distance (in mm) from the sample to the detector.

Intensity calculation mode

Function name description
ReciPro.DifSim.Calc_Excitation() Calculate the intensities with excitation error only.
ReciPro.DifSim.Calc_Kinematical() Calculate the intensities using the excitation error and the structure factor.
ReciPro.DifSim.Calc_Dynamical() Calculate the intensities by the dynamical theory.
ReciPro.DifSim.NumberOfDiffractedWaves Integer. Set or get the number of diffracted waves used in the dynamic calculation.

Image properties

Function name description
ReciPro.DifSim.ImageWidth Integer. Set/Get the image width in pixel.
ReciPro.DifSim.ImageHeight Integer. Set/Get the image height in pixel.
ReciPro.{modeStr}.ImageSize(in width, int height) Set the image size in pixel.
ReciPro.DifSim.ImageResolutionInMM Float. Set/Get the image resolution (mm/pix).
ReciPro.DifSim.ImageResolutionInNMinv Float. Set/Get the image resolution (nm^-1/pix).
ReciPro.DifSim.Foot(double x, double y) Set coordinates (in mm) of the foot of the perpendicular line from the sample to the detector.

Misc

Function name description
ReciPro.DifSim.SkipRendering True/False. Set/get whether screen rendering is skipped or not.
ReciPro.DifSim.SpotInfo() Get spot information as CSV-format text.
ReciPro.DifSim.SaveAsPng(string filename) Save the current simulation pattern as a PNG-format format file. If filename is omitted, a dialog will open.

ReciPro.HRTEM, STEM, Potential

  • The following functions that contain "#" are common to HRTEM, STEM and Potential. Replace the “#” part with "HRTEM", “STEM” or "Potential"
  • The ones that contain "$" are common to HRTEM and STEM. Replace the "$" part with “HRTEM” or “STEM”.

Open, Close, Simulate

Function name description
ReciPro.#.Open() Open the 'Image Simulator' window..
ReciPro.#.Close() Close the 'Image Simulator' window.
ReciPro.#.Simulate() Simulate HRTEM, STEM, or potential image(s) with the current settings.

Microscope properties

Function name description
ReciPro.#.AccVol Float. Set/get the accelerating voltage of electrons (in kV).
ReciPro.$.Thickness Float. Set/get the sample thickness (in nm).
ReciPro.$.Defocus Float. Set/get the Defocus value (in nm).
ReciPro.$.Cs Float. Set/get the Cs (spherical aberration) value (in mm).
ReciPro.$.Cc Float. Set/get the Cc (chromatic aberration) value (in mm).
ReciPro.$.DeltaV Float. Set/get the ΔV (1/e width of electron energy fluctuations) value (in eV).
ReciPro.$.Scherzer Float. Get the Scherzer defocus value (in nm).
ReciPro.STEM.ConvergenceAngle Float. Set/get the convergence semiangle (in mrad).
ReciPro.STEM.DetectorInnerAngle Float. Set/get the inner semiangle (in mrad) of the annular detector.
ReciPro.STEM.DetectorOuterAngle Float. Set/get the outer semiangle (in mrad) of the annular detector.
ReciPro.STEM.EffectiveSourceSize Float. Set/get the effective source size (FWHM in pim).
ReciPro.HRTEM.Beta Float. Set/get illumination semiangle β (in mrad) of the electron beam due to the finite source size effect.
ReciPro.HRTEM.ApertureSemiangle Float. Set/get the semiangle (in mrad) of the objective aperture.
ReciPro.HRTEM.ApertureShiftX Float. Set/get the x-direction shift (in mrad) of the objective aperture.
ReciPro.HRTEM.ApertureShiftY Float. Set/get the y-direction shift (in mrad) of the objective aperture.
ReciPro.HRTEM.OpenAperture True/False. Set/get the open aperture state.

Simulation properties

Function name description
ReciPro.#.NumberOfDiffractedWaves Integer.Set/get the maximum number of diffracted waves (Bloch waves) used in the dynamical scattering theory.
ReciPro.#.ImageWidth Integer. Set/get the width of the image to be simulated (in pixel).
ReciPro.#.ImageHeight Integer.Set/get the height of the image to be simulated (in pixel).
ReciPro.#.ImageSize(in width, int height) Set the image size to be simulated (in pixel).
ReciPro.#.ImageResolution Float. Set/get the resolution of the image to be simulated (in picometer/pixel).
ReciPro.STEM.AngularResolution Float. Set/get the angular resolution (in mrad) of the convergent beam.
ReciPro.STEM.SliceThickness Float. Set/get the slice thickness (in nm) for TDS calculation.
ReciPro.HRTEM.Mode_LinearImage() Use linear image model for calculating partial coherency.
ReciPro.HRTEM.Mode_TCC() Use TCC (transmission cross coefficient) model for calculating partial coherency.

Single/serial image mode

Function name description
ReciPro.$.SingleImageMode() Set to single image mode.
ReciPro.$.SerialImageMode(bool withThickness, bool withDefocus) Set to serial image mode with/without thickness and with/without defocus.
ReciPro.$.SerialImageThicknessStart Float. Set/get the starting thickness (in nm) in serial images.
ReciPro.$.SerialImageThicknessStep Float. Set/get the thickness step (in nm) in serial images.
ReciPro.$.SerialImageThicknessNum Integer. Set/get the number of the thicknesses in serial images.
ReciPro.$.SerialImageDefocusStart Float. Set/get the starting defocus (in nm) in serial images.
ReciPro.$.SerialImageDefocusStep Float. Set/get the defocus step (in nm) in serial images.
ReciPro.$.SerialImageDefocusNum Integer. Set/get the number of the defocuses in serial images.

Image properties

Function name description
ReciPro.#.UnitCellVisible True/False. Set/get whether or not to display a unit cell.
ReciPro.#.LabelVisible True/False. Set/get whether or not to display an image label.
ReciPro.#.LabelSize Integer. Set/get the size of labels
ReciPro.#.ScaleBarVisible True/False. Whether or not to display a scale bar.
ReciPro.#.ScaleBarLength Float. Set/get the length of the scalebar (in nm).
ReciPro.#.GaussianBlurEnabled True/False. Set/get whether or not to process Gaussian blur.
ReciPro.#.GaussianBlurFWHM Float. Set/get the FWHM value (in pm) of Gaussian blur.
ReciPro.STEM.DisplayBoth() Display both elastic and TDS (inelastic) electrons.
ReciPro.STEM.DisplayElastic() Display elastic electrons only.
ReciPro.STEM.DisplayTDS() Display TDS (inelastic) electrons only.

Save image

Function name description
ReciPro.#.SaveImageAsPng(filename) True/False. Save the simulated image as a PNG format. If the file name is omitted, a dialog box will appear.
ReciPro.#.SaveImageAsTif(filename) True/False. Save the simulated image as a TIFF format. If the file name is omitted, a dialog box will appear.
ReciPro.#.SaveImageAsEmf(filename) True/False. Save the simulated image as a Metafile (EMF) format. If the file name is omitted, a dialog box will appear.
ReciPro.#.SaveIndividually True/False. When simulating in serial image mode, whether or not to save each image individually.
ReciPro.#.OverprintSymbols True/False. On the saved image, whether or not to overprint the unit cell, labels, and scale bar.

Clone this wiki locally