emScope 1.0b2 Version 1.0b2 is the second beta(test) release. The official "release" of 1.0 is obviously behind schedule. CRITICAL NOTES: The release provided here does not exactly match the provided documentation. The documentation is how it "should" be done, not quite how I did it the first time around. The final 1.0 release will bring things in sync I hope. Main differences from library documentation: Documented functions begin with "emc" prefix. Actual functions begin with "em" prefix. Documented camera functions refer to a Camera ID value, this has not been added to the library. It will allow support for more than one camera at a time. Documented functions awful list parameter constants that don't yet exist. Documented constants begin with "EMC" prefix. Actual constants begin with "EM" prefix. The most critical item missing from this release is I have provide no mechanism for filling out the calibration table. You will have to look at the source code and use the "emsetcal" application to fill in some required calibration values before many functions will work. If you always use "clicks" parameters to the functions you may be ok. Sorry about this. The way calibrations are done are in complete chaos and need to be rewritten. Hopefully after I add Tcl/Tk scripting extensions to the release (soon, mostly packaging, documentation, installation instructions to be done) some scripts will be written to fill in some of the basic calibration values. To enable calibration files you need to create a directory /usr/local/lib/cm200/cal that is readable by all, and writable by whoever is running the "emsetcal" application. An example of a file that gets written here is 660x120kV.cal: magnification: 660.00000000 ht: 120.00135000 f_pixsize: 26.70000000 f_intensity: 4.34000000 c_I0: 41644.00000000 f_defocus: NaN f_defocus_int: NaN f_defocus_beamx: NaN f_defocus_beamy: NaN f_tiltx: NaN f_tilty: NaN f_astigx: NaN f_astigy: NaN f_imageshiftx: 0.00000000 f_imageshifty: 0.00000000 f_beamshiftx: 0.00000000 f_beamshifty: 0.00000000 f_gonposx: 1.00000000 f_gonposy: 1.00000000 f_gonposz: 1.00000000 f_gontilta: 1.00000000 f_gontiltb: 1.00000000 f_imageshift: NaN NaN NaN NaN c_F: NaN s_beamshift: NaN NaN NaN NaN s_imageshift: NaN NaN NaN NaN s_gonshift: 550.92881184084774 804.78757247441388 848.95969160604341 -554.04651708284325 m_astigx: NaN NaN NaN NaN m_astigy: NaN NaN NaN NaN m_defocus: NaN NaN NaN NaN Hmmm... doesn't look like we've filled this one in very well yet either. Told you it was a mess. Good luck. Its probably best you send us email to discuss how calibrations work. Studying the source code is probably best if you are a programmer type... Available Binaries and Source Code ---------------------------------- emscope-1.0b2-irix6-n32.tar IRIX 6.2 N32 Binary Distribution emscope-1.0b2-aix4.tar AIX 4.x Binary Distribution emscope-1.0b2-src.tar Source-only Distribution Prerequisites for v1.0b2 source release --------------------------------------- jpeg-6a JPEG Libraries from the Independent JPEG Group (jpeg-6b suspected to not work for some reason) Expected to be installed in /usr/local/lib and /usr/local/include. Note when installing for IRIX make sure you use compiler options consistent with those you use to build emscope. (ie, build both as N32 or O32 but you can't mix types). emScope Consits of the following components: -------------------------------------------- libtao.a Common Project Library consisting of routines for command-line argument processing, function tracing, internet communication, and semaphore handling. tao.h Header file supporting the above library libsips.a Suprim Image Processing System Library consisting of a small set of image processing routines used by some of the automation routines. sips.h Header file supporting the above library libemCM200.a Library for controlling the Philips CM200 Microscope em.h Header file supporting the above library RCMd Server for remote control of the Philips CM200 SSCd Server for remote control of Gatan's Digital Micrograph Application. emget emset emgetcal emsetcal emgetstate emsetstate emfocus Installation ============ 1. Copy the binary and/or source tar files into a working directory of your choice. We'll call this director "BUILD-DIR" 2. If you are installing the source code % cd BUILD-DIR % tar -xvpf emscope-1.0b2-src.tar 3. If you are installing a precompiled binary for system architecture PLATFORM (PLATFORM=AIX4 or IRIX6-N32). % cd BUILD-DIR % tar -xvpf emscope-1.0b2-PLATFORM.tar 4. If you only installed the source code you must now build the binaries for your system. 4a. First the JPEG-6A Libraries must be installed in /usr/local/lib. A copy of jpegsrc.v6a.tar is available from the same location you got this file from. Untar this file and follow its instructions for building and installing the libraries. Note use the same CFLAGS options when building this library as you do below (IRIX especially, N32 vs. O32 builds) 4b. % cd BUILD-DIR % cd emscope-1.0b2 FOR IRIX 6.x N32 we recommend: % setenv CFLAGS "-O3 -n32 -Wl,-woff,84 -mips3" FOR IRIX 6.x O32 we recommend % setenv CFLAGS "-O2 -32 -Wl,-woff,84 -mips2" FOR IRIX 5.x we recommend % setenv CFLAGS "-O2" FOR AIX 4.x we recommend % setenv CFLAGS "-O3 -qmaxmem=32000 -qstrict" Note if you are not familiar with N32 and O32 formats for IRIX 6.x, then you may have to try both to see how your system is configured. Most likely O32 will work for you. (N32 is better, but requires more knowledge and is only for R4000 machines and better). The code should port fairly easily to other versions of Unix. If you do this please let me know what changes were required and I will incorporate them into the distribution. % make install This should build a binary release similar to the precompiled packages in the "install" directory. 5. The binaries can optionally be installed into the "production" directories of the system. In this we assume you want to place the binaries in /usr/local/bin, /usr/local/lib, and include files in /usr/local/include. % make production If you don't do this you need to change all future references to /usr/local/X with BUILD_DIR/emscope-1.0b2/install/X *6. You must now make some system configuration changes in order to use the instrument control servers. You must edit the file /etc/services (you will need root access) and add the following lines: SSCd 1701/tcp # SSC Server Daemon (GatanSSC) RCMd 1970/tcp # RCM Server Daemon (CM200) You must edit the file /etc/inetd.conf (you will need root access) The indented line should be on the same line as the line above it. RCMd stream tcp nowait root /usr/local/bin/RCMd RCMd -d /dev/tty0 -log LOG_LEVEL1 SSCd stream tcp nowait root /usr/local/bin/SSCd SSCd -server (MAC DNS) -log LOG_LEVEL1 -p 1701 For SGI IRIX replace /dev/tty0 with /dev/ttyd2 on the RCMd line Replace (MAC DNS) on the SSCd line with the hostname or IP # of the macintosh running Digital Micrograph Remote Scripter Plugin. 7. You must restart inetd. Either by rebooting your computer (always works) or by one of these methods: For SGI IRIX (you will need root access) % /etc/killall -HUP inetd For IBM AIX (you will need root access) % refresh -s inetd 8. You must install a serial cable between the workstation and the CM200 serial computer interface (we use a data switch box so we can easily switch control to a PC we also have attached to the instrument). On an SGI system use serial port number 2. On an AIX system use serial port number 1. 9. You must install the Remote Scripter plugin for Digital Micrograph on the Macintosh you have running your Gatan SSC/MSC Camera. The remote scripter is available seperately from this package to allow it to be more easily transfered to your Macintosh. Download the file DM-RemoteScripter.sea from the site you got this distribution from onto the Macintosh your Gatan camera is attached to. Double click the file to extract the plugin. Move the plugin into the plugin directory of digital micrograph that current contains your camera plugin. Now when you start DigitalMicrograph you will have a new menu item called "Remote". Select "Await Connections" and the program will be in remote mode. 10. Set communication variables To set up default servers for the system to use you must set to environment variables % setenv RCMHOST workstation:1970 % setenv SSCHOST macintosh:1701 where "workstation" is the DNS name or IP number of the workstation that is connected to the CM200 and is running RCMd daemon where "macintosh" is the DNS name or IP number of the macintosh that is connected to the Gatan SSC/MSC camera and is running Digital Micrograph in remote mode. 11. Test % emget -mag should return current magnification of the CM200 % emacquire > test.f should acquire a 512x512 image from the gatan camera and save it in the file test.f (suprim file format) 12. Send me email that you actually got it to work this far. I will be impressed. Please let me know of any changes I need to make to these instructions. They are untested.