Filming a Movie

May 29, 2006

A simple script to show how animations are done:

tell application “Apex”
starting the movie
set destinationFile to “Macintosh HD:coercion movie”
start filming of window 1 of document 1 saving in destinationFile
saving movie frames
repeat 90 times
rotate window 1 of document 1 axially 0.1
rotate window 1 of document 1 vertically 1
save movie frame of window 1 of document 1
end repeat
stopping the movie
stop filming of window 1 of document 1
end tell

Basically, there are three phases of the script: starting the filming, saving frames, and stopping the filming.

In this script, the name of the movie is hard coded. That’s a problem if you’d like to run the script a number of times. If you’d like to generate a different name for the movie each time, try doing this:

set secs to (( current date ) – (date “Sunday, January 1, 2006 12:00:00 AM” ))as text
set destinationFile to “Macintosh HD:movie ” & secs

secs will be the number of seconds since the first of the year, so as long as you wait one second between script runs, you’ll have a different name for the movie file. Or perhaps you’d like to name the file with a traditional Mac OS put file dialog. In which case, do this:

set destinationFile to choose file name

You’ll have interesting results if you change the size of the window while the script is running. QuickTime movies have a fixed size, so the size that you start with is the size you’ll get no matter what.

Imago Buys Oxford Nanoscience

April 13, 2006

The title says it all. Here’s the press release from Polaron:

Here’s my take on the situation:

Essentially, Polaron is getting out of the Atom Probe business, no doubt because the Imago had better technology and better approach to sales and developing a business. When Oxford’s main competitor was Cameca/Rouen, Oxford had the upside of being the preferable instrument for sales to industry, whereas the Cameca/Rouen instrument was better suited to the research lab.

With the ascendence of Imago’s LEAP, the high end of Oxford’s business was essentially cut off, and Polaron was left to fight for academic scraps with Cameca. Now, Cameca might be able to justify that because of their other academic oriented research instruments, and with the level of the collaboration they have with Rouen. Polaron, however, found it just wasn’t worth it for the small market that exists for Atom Probes.

Imago, meanwhile, gets a significantly cleaner playing field and some technology thrown in as well, so as long as the price doesn’t sink them, it seem like a good deal for them. Polaron, meanwhile, exits gracefully from the market with a little cash and a continuing investment, and more time to focus on their core business. Not a bad deal there, either.

Improvements in Apex a35

March 16, 2006

Apex a35 adds the ability to export to Rouen‘s Wide Data format, or the .ato file format.

Because the .ato file format includes a number of parameters which are specific to the detector and data acquisition, some of these fields are not filled in with real values. However, the file does contain the xyz positions and masses for the 3d atom probe data, and the evaporation voltage, if available.

Also, there was a bug that prevented Apex a34 from using the export to atomlist and export to .pos file options from the export menu. This bug has been fixed.

Imago’s March Newsletter

March 16, 2006

Imago ‘s March newsletter is on the web.

Imago, of course, is the manufacturer of the LEAP ( Local Electrode Atom Probe), the technique which has really increased the data collection rate for 3D Atom Probe, and with this technique the analysis volume of a 3D ATom Probe Sample has increased more than tenfold, opening up completely new research challenges.

Improvements in Apex a34

March 11, 2006

Apex a34 fixes a bug which prevented smooth dragging of a window. Basically, Apex was not being smart about reusing the caches image in memory when the window position changed but the window size did not. Ah well.

I also made a change in the way drawing information is ordered in memory. This means a small speedup in drawing ( 5% or so, although I expected more).

Also, there is better auto redraw when zooming in and out. As a bonus, this action now gets recorded in Script Editor’s recording feature.

Speeding up a Mass Ranges Script

March 10, 2006

You may have a script which defines a lot of mass ranges and the colors and sizes for each atom type. One of the things that makes this script a little slow is that Apex will redraw the screen live with each change to the graphics state, even though that really isn’t useful until the whole script is over.

To make this script go faster, use the ‘updating atomtypes’ property of an Apex document — while this setting is false, Apex will avoid recalculating all the mass ranges, which saves a bit of time if you start to get a lot of them.

Additionally, you can turn off redraws in the window using the ‘doing redraw’ property of a window — while this is false, the window contents won’t be redrawn.

Be sure to turn these two properties back on when you are done with a script action. Here’s an example script using these two properties:

to setAtomtypeProps(typeIndex, typeColor, typeSize, typeName)
tell application “Apex”
set the color of atomtype typeIndex of document 1 to typeColor
set the size of atomtype typeIndex of document 1 to typeSize
set the name of atomtype typeIndex of document 1 to typeName
end tell
end setAtomtypeProps
tell application “Apex”
activate

set doing redraw of window 1 of document 1 to false
set updating atomtypes of document 1 to false

if ((count mass ranges of document 1) > 0) then
delete every mass range of document 1
end if
make new mass range with properties {name:”Al”, lower limit:13.38, upper limit:13.84, atomtype:4} in document 1
make new mass range with properties {name:”Fe”, lower limit:26.82, upper limit:27.34, atomtype:1} in document 1
make new mass range with properties {name:”Ni”, lower limit:28.88, upper limit:29.26, atomtype:2} in document 1
make new mass range with properties {name:”Ni”, lower limit:29.860001, upper limit:30.24, atomtype:2} in document 1
make new mass range with properties {name:”Ni”, lower limit:30.84, upper limit:31.26, atomtype:2} in document 1
make new mass range with properties {name:”Cu”, lower limit:31.379999, upper limit:32.32, atomtype:3} in document 1
make new mass range with properties {name:”Cu”, lower limit:32.400002, upper limit:33.139999, atomtype:3} in document 1
make new mass range with properties {name:”Cu”, lower limit:62.66, upper limit:64.5, atomtype:3} in document 1
make new mass range with properties {name:”Cu”, lower limit:64.660004, upper limit:66.5, atomtype:3} in document 1
set updating atomtypes of document 1 to true
end tell
setAtomtypeProps(1, {0, 0, 65535}, 0, “Fe”)
setAtomtypeProps(2, {0, 65535, 0}, 1, “Ni”)
setAtomtypeProps(3, {65535, 0, 0}, 1, “Cu”)
tell application “Apex”
set doing redraw of window 1 of document 1 to true
end tell

Improvements in Apex a33

February 26, 2006

Apex version a33 was delivered recently. This version is now completely converted to composited windows and the Carbon Event drawing model, upgrades the QuickTime API to version 6, replaces the Scrap Manager with the Pasteboard Manager, and reenables multiprocessor mode for drawing.

NUCAPT has an Apex web page

February 25, 2006

NUCAPT has a web page devoted to Apex. Thanks for maintaining that, Richard!