Megacam Software Developers' Page
Welcome. More general information on the Megacam
project can be found on the main CFHT Web site. This page is
mainly of interest to those involved in the software developement
effort. Any relevant documentation should at a minimum have a link
referring to it on this site. Preferably, an actual copy of the
document should be mirrored here.
To contribute new documents, or new versions to this page, please
see Submission Guidelines at the end of this page.
Docs from CFHT Relevant to Software Design
The Megacam Agent, "MA"
Communications for megacam can be subdivided into three major categories,
and at this point it seems likely that, because of their differences,
they may be handled by three different methods:
- Data Feed
- NOAO's message bus system, currently in use with their 8K by 8K mosaic,
will be used to send data directly from the CCD host to the final
destination(s) (disk, image display, data archive.) This system
uses PVM (parallel virtual machine) to establish a socket connection
with the appropriate machine and sends raw, scrambled data to the other
end for processing. We will be gaining more experience with NOAO's message
bus and related tools as we use it with the UH8K and CFH12K mosaics.
More information on the data feed will
be posted as we gain some experience with the software. Meanwhile
just getting the raw data to disk with some minimal fits headers might
be the best plan. Keep in mind, however, that in the final analysis
we will need to have packets written to the message bus instead, but
this should not be such a major issue. The message bus protocol is
quite flexible, and will be able to accept packets containing a mix of
(scrambled or not) pixels streams (possibly even coming from several controllers
at the same time) plus fits headers and assemble it all for you.
- Issues such as sending a command request to an application, or
getting feedback messages to the user will be managed by CFHT's
director program. Facilities for scripting, accepting
commands from a Graphical User Interface (GUI), and providing a
user-friendly text interface to the user will all be handled
by the director. The manual for director
describes its function as compared to older ideas already in
place at CFHT. Keep this in mind when you see references to
"handlers" and "servers".
- CFHT Director version 2 includes
tips for writing a command driven program, called an "Agent".
The appendix has instructions for building director on your
- director-2.6.tgz [0.30 MB] contains the source
code plus supporting CFHT libraries and Makefiles. If you're really
stuck, we can provide a binary for Solaris, but please try and build
- rxvt-2.19-cfht.tgz [0.35 MB] is a patched
version of the rxvt color text terminal. If you don't care
about colors, you can just run director in an Xterm window
or any other terminal type supported by the ncurses library.
The tar file includes SunOS, Solaris, and HP-UX 9 binaries, source,
some Xdefaults (to be merged into your xrdb or included in your
.Xdefaults/.Xresources), a background pixmap image, and a fixed font (vga.pcf).
You don't need all this stuff, but it just makes it look nice if
you install it all properly. Shift-Numpad-Plus and Shift-Numpad-Minus
increase/decrease the font size. A mirror of the man
pages for rxvt are available on this site, and are also included
with the tar file.
- ncurses-4.1-cfht.tgz [1.35 MB] may also
be useful because it is known to work well with rxvt-2.19-cfht. Links
to some documentation on ncurses and its libraries is included, and
is also mirrored
on this site.
- State Information
- Internally within your program you will likely have a number of
state variables storing things like the current filter position,
shutter opened/closed, etc. Please design your code with hooks
that will allow "broadcasting" these to other programs that may
be interested in the information. The traditional way of distributing
state information at CFHT has been to create "par files" and write
the data into these files, but we would like to find a more
elegant and efficient way for the Megacam project. Channel access
"process variables" from EPICS may be one option, or something
as simple as printf'ing a single line with "variable=value\n" to
director may work, assuming director could then broadcast it via
channel access, but the detials of this have not yet been deterimined.
Please send in links to relavent documentation elsewhere on the
Web and I will add a link or make a copy of documentation to
keep locally on http://software.cfht.hawaii.edu/megacam/.
To contribute a new document, please
create a .tar or .zip file and upload it to the directory
Then send me (email@example.com)
an email message to let me know it's there. The archive should contain:
- A single, self contained HTML document OR
A single subdirectory with the HTML files
plus any supporting GIFs
that may be required to make the page complete.
- If the HTML format is in multiple pages, please supply a PostScript
and/or PDF version of the whole document as well.
- It would be helpful if you create a hyper-text link in the main HTML file
pointing to the PostScript version (which could live in the same
subirectory) that allows people to download this printable version from the Web site.
- If the document contains multiple files and lives in a sudirectory,
please copy the main file to "index.html" if your conversion software
didn't already do this. Don't remove the file with the original name
though, because your software may have created hypertext links that
use that name.
- Please check that there are no <IMG> tags in your document that
refer to files on your local disk (i.e. <IMG SRC="file:///C/myfiles/foo.gif">)
because they will not work for anyone else once the document is published
on the Web.
- Use relative links instead of absolute where-ever possible. (Most
conversion software will take care of this automatically.)