Skip to main content

Questions tagged [dm-script]

A scripting-language used within the DigitalMicrograph software.

dm-script
1 vote
2 answers
30 views

Is there a function that can return the median value of an image expression

There is a function to get the median from number expressions in DM. For example: // number expression number x=3, y=5, z=10; number num = median(x, pi(), y,z); OKDialog( "num = " + num); ...
KEVIVI's user avatar
  • 35
2 votes
2 answers
44 views

Managing tag paths shared by different scripts

Is there an efficient and elegant way to managing tag paths used by different scripts? For example, I have one script to write certain metadata in to an image: // common tag group paths string ...
KEVIVI's user avatar
  • 35
1 vote
1 answer
31 views

Reconstructing EELS Spectra from Individual Files for SI-picker

I have EELS spectra from a STEM experiment that were unfortunately output into individual files instead of a single stack. Given that the dimensions in the real and EELS space are known, would it be ...
James Cho's user avatar
0 votes
1 answer
56 views

Split mrc file into pieces by using DM script

I have a mrc file, which contains 10 pieces. After loading into DM, I can browser the pieces by using the left and right arrow. I'd like to use DM script to read the mrc file and then save each piece ...
ChenZX's user avatar
  • 37
1 vote
1 answer
38 views

Reading and manipulating a 3D stack of MRC images

The problem I am trying to solve is a three-parter. I am trying to read a 3D stack of MRC images (not as in: Can DM script read images with the same extension (like *.mrc) from a folder?), apply a ...
James Cho's user avatar
1 vote
1 answer
43 views

Some letters are cut in the checkbox lables

I run the typical example of DLGCreateDialog in GMS 3.2.xx and GMS 3.5.xx TagGroup DLG, DLGItems DLG = DLGCreateDialog( "Please enter strings", DLGItems ) TagGroup opt1tg = DLGCreateCheckBox(...
Yuan Yao's user avatar
2 votes
2 answers
60 views

Returning an image in a function

I am writing a function that takes in an image, modifies it, and returns the modified image. Image SomeFunction(Image img) { Image modified = img // modify the clone return modified } ...
James Cho's user avatar
0 votes
1 answer
27 views

Keep a oval annotation as a circle by using dm-script

If I manually change the size of the circle by using dm-script, is that possible to lock the center of the circle to center of FFT image, and also keep it as a circle, instead of ellipse
ChenZX's user avatar
  • 37
0 votes
1 answer
45 views

What's the center of FFT image in dm-script

I'd like to draw a circle in FFT image, and the circle center is image center. The first issue I faced is what's the center of this FFT image. If I used the code below to get the center of FFT image, ...
ChenZX's user avatar
  • 37
2 votes
1 answer
30 views

Regular expressions in dm script

Does the Digital Micrograph scripting language have any built-in support (not including Python) for regular expressions? Looking through the built-in documentation I do not see any reference to regex ...
Abstracted's user avatar
2 votes
1 answer
40 views

encoding and decoding strings in dm-script and Python

My files sometimes contain multibyte characters in file-path or text in the file. And I can not read the correct strings from the file. I know the best way is to avoid using multibyte characters... ...
arksakura's user avatar
0 votes
2 answers
48 views

Is there slide widget in dm-script

I'd like to create a slide widget in dm-script, which can show a slider in the UI. The value of the slider position is integer. But I didn't find any useful information in the manual.
ChenZX's user avatar
  • 37
0 votes
1 answer
38 views

How to know whether GMS UI has a sub-menu

In GMS UI, I have a menu, which has a sub menu. I'd like to confirm whether the sub menu exists in dm-script. If the sub menu exists, I can use the code below to get the name. But if the sub menus ...
ChenZX's user avatar
  • 37
0 votes
1 answer
32 views

Delay of line profile update

I'd like to get the updated ROI length in profile after I changed the scale of the image. But when I run the code below, the ROI length before and after changing the scale of the image is the same. It ...
ChenZX's user avatar
  • 37
1 vote
0 answers
40 views

Velox aborts experiment due to failure to acquire resource in DigitalMicrograph with custom code running

We have a Talos TEM that sends data from Velox over to GMS/DigitalMicrograph during EELS Tomography experiments. During the experiment, DigitalMicrograph opens a new workspace for each collection/...
Abstracted's user avatar

15 30 50 per page
1
2 3 4 5
26