DigitalMicrograph TEM control "beam blank" - hardware

I've been trying to automate the process for acquiring a series of images using DM script. And in between acquisitions there's the processing time, which the electron beam is still illuminating the specimen. Is there any DM script function for controlling the beam blank (so that it also applies to beam-sensitive materials)? I'd appreciate any feedback/response.

GMS 3.2 has such a command - but not all systems support it. You can use EMHasBeamBlanker() to check this and then use EMSetBeamBlanked( bool ) and bool EMGetBeamBlanked()

Related

Automate ALM QC's data extraction with an API & Python

I want to automate the extraction of my data relating to the tests carried out on ALM Quality Center, and I was wondering if it was possible via an API?
In particular, I want to recover, in Excel format, data such as the number of successful tests, the number of failed tests...
Thank you in advance for your response!
I'm new to the tool so for now I'm just reading the documentation.

configure motion-project to record from two cameras simultaneously

I use the tool "motion" (motion-project, https://motion-project.github.io/) to record Videos of two IP-cams, cam-1 and cam-2.
I tried to configure it that detected motion at cam-1 is triggering recording of cam-1 and cam-2 simultaneously, but until now I wasn't successful.
I found the parameter on_event_start and on_event_end, that allow the execution of a script/command at start and end of detected motion, but I found no way of telling the sw motion to start the recording of cam-2 also.
Maybe I can run a script at on_event_start that starts recording with a separate tool like ffmpg for both cams ?
Motion is indeed a very mighty tool, but too many features are hard to overview.
Thanks for any suggestions to solve it.

How to use a simulation output in Matlab using Sim API

I am simulating a Simulink model(using script) and currently using a toworkspace block to first save the output data to workspace and then using these data for further processing in my script.
My simulink model has two outputs velocity and acceleration.
But in my script I want to simulate the model and meanwhile use the model outputs to be saved or further used without using the toworkspace block.
I tried:
set_param('mdl_name','SaveState','on','StateSaveName','State',...
'SaveOutput','on','OutputSaveName','velocity');
data=Simulink.SimulationOutput;
I expected the data to have velocity values but it returns empty value.
I need some suggestions regarding whether there is another way to use an API and access a particular simulation output after simulating it via script or a suggestion to improve the above script.
Several causes can lead to this behavior. I suggest you to run "sldemo_varsize_basic" in MATLAB command window. This will start a built-in application example of the "ToWorkspace" block. Compare the parameters of the "ToWorkspace" blocks in this model and your model + the "Data Import/Export" pane in the "Configuration Parameters".
I was also using the "ToWorkspace"-based approach, but I changed to storing the results by "Signal Logging" ( in my application I found it more convenient to handle the results + there are no additional blocks required each time I want to log a new signal).
A complete list of ways to "Save Runtime Data from Simulation" is listed on the linked Mathworks website.

TFS Api - trigger test run conditionally (when new files come)

I'm trying to get acquainted with test automation using Microsoft TFS Api.
I've created the program which runs my test set - it uses code similar to one described here, e.g.:
var testRun = _testPoint.Plan.CreateTestRun(false);
testRun.DateStarted = DateTime.Now;
// ...
testRun.Save();
I believe this forces them to start as soon as any of agents can run them, instead of being delayed to certain time. Am I wrong? Anyway, it works all right.
But I was told by my lead that the task should be started each time the new input files are copied to certain folder (on the network I think, or perhaps in TFS).
So I'm searching for a way which allow to trigger tests on some condition - but currently without any luck. Probably I miss proper keywords.
I only found something vaguely related here but it seems they say it is not possible in a proper way.
So are there any facilities in TFS / MTM, any ways or approaches to achieve my goal? Thanks in advance for any hints / links.
You would need to write a system service (or other) that uses the file system watcher. Then when the file changes you can run your code above.
There is no built in feature in TFS to watch a folder for changes.

Counting how many script in SSIS have been completed

In SSIS package i have multiple scripts running within a job. At any given time i want to read how many scripts have been executed eg, 5/10 (50%) have been completed. Please tell how can i achieve that?
Currently there is no such functionality provided by SSIS to track progress of package execution.
It seems you need to write your own custom utility/application to implement same or use third party one.
There are few ways to do -
Using a switch called /Reporting or /Rep of DTEXEC at the command-line . For example:
DTEXEC /F ssisexample.dtsx /Rep P > progress.txt
2.Implement package logging or customize it.
3 . Implement Event handler on required executable. You can also use OnPipelineRowsSent log of Data Flow Task.
If you want to write your own application then below thread will provide nice starting point.
How do you code the Package Execution Progress window in C#
In my experience, we are using another software to monitor the jobs that are running. http://en.wikipedia.org/wiki/CA_Workload_Automation_AE
You can also try to create your own application that runs on the background that checks that status of your jobs, through checking the logs.