Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.astro.louisville.edu/software/sbig/archive/xmccd-2.0/INSTALL
Дата изменения: Sat Jul 22 09:09:00 2006
Дата индексирования: Mon Oct 1 20:53:25 2012
Кодировка:

Поисковые слова: arp 220
Installation Instructions for XmCCD with the SBIG Library
=========================================================

This is a recipe for installing XmCCD and auxiliary software especially for
those who may not have experience with Linux system management. If you try
this and find I have left out something, please let me know and I will
include it in the next version.

This version of xmccd only supports the USB cameras. For LPT camera support,
please use an earlier version on a Linux distribution such as Slackware 10.2
that runs a 2.4 series kernel.

I. Resources
-------------

First, you will need the software sources. It is best to compile xmccd from the
source to be sure that it will work with your system.

1. XmCCD

Our website

http://www.astro.louisville.edu/moore/software

provides two files:

xmccd-2.#.#.tar.gz
xmccd_support_source.tar


As root or superuser, copy both of these to /usr/local/src. Untar xmccd with
the command

tar xvzf xmccd-2.#.#.tar.gz

where "#" here will be a version number. Also untar the support source

tar xvf xmccd_support_source.tar

to leave several more source packages in /usr/local/src. We will take each
of these in order. You may not need them all if they are already installed on
your system.


2. LessTif or Motif

Look for library files such as libXm.a, libXm.la, and
libXm.so which are usually in /usr/X11R6/lib. You might also simply
try to compile xmccd (see below) before you proceed to install Motif, and if
there is an error message that a library is missing, that is a good indication
that you need to install either LessTif or Motif.

The support source package includes the most recent opensource version of
Motif that is known to work with xmccd. If you download another version, try to
identify one that is stable and well tested from

http://www.motifzone.net

or the Gnu-licensed version of LessTif at

http://www.lesstif.org/

and follow their installation instructions.

If you use the source we supply then

cd /usr/local/src/openMotif-2.2.3
./configure
make
make install
ldconfig

This will put the Motif libraries and headers in the standard location
/usr/X11R6



3. SBIG Library

There will be a version of these in the xmccd package in its sbig
subdirectory. You should use the included version if at all possible because
it will have been tested with this version of XmCCD. The sbig directory
in the XmCCD distribution also will include kernel modules and scripts for
installing them. Do not install these modules.

If you want to check the original SBIG library source for the latest new
developments, go to the SBIG Linux website, currently at

http://www.sbig.com/sbwhtmls/devsw.htm#Section%20IV

Before compiling and running xmccd

cd /usr/local/src/xmccd-2.#.#
cp -R sbig /usr/local
cd sbig
cp lib* /usr/local/lib/
ldconfig



4. fxload

The fxload utility uploads firmware to the camera. It may be present on your
system, so look for /sbin/fxload before installing it here. The source for
fxload in xmccd-#.#.# is a version that is patched to work with recent
distributions from Suse and Redhat. The SBIG library package includes
instructions on getting fxload from source, but that version would have to be
patched before it will compile.

cd fxload
make
make install

will create /sbin/fxload and a man page for fxload, as well as some database
files that are no longer needed.


5. cfitsio

The FITS file library known as "cfitsio" is required to compile xmccd since we
use fits files exclusively for storing images. The source is in the support
files package, and it is also linked from our website. As root user

cd /usr/local/src
tar xvf cfitsio_2.510.tar
cd cfitsio/cfitsio
make
cp libcfitsio.a /usr/local/lib
ldconfig


6. ds9

This is the powerful image display software from the Harvard-Smithsonian Center
for Astrophysics . XmCCD uses it to display the images and to provide image
analysis and file handling. Build it from the source provided here, or download
source or binaries from

http://hea-www.harvard.edu/RD/ds9/

With the source package in /usr/local/src, as root user

cd /usr/local/src
tar xvf ds9.4.0b8.tar.gz
cd saods9
ln -s make.linux make.include
make
cd bin
cp ds9 /usr/local/bin
cp xpa* /usr/local/bin

This is a complex program and continually under development. The version we
include is one that has been tested with xmccd. If you download the binary
files instead of compiling from source, simply copy them to /usr/local/bin/.
Note that you need both the ds9 and the xpa commands installed.


7. LibUSB

Your system will need libusb. You can skip this step, follow all the others,
and if xmccd reports that it cannot find a device then the likely cause is a
problem with this library. Follow these directions as given in the SBIG
package to install libusb:

a. Download the current stable version from:
http://libusb.sourceforge.net/ or use the version in the support package.
The current version as of this note is 0.1.12
b. As root
cd /usr/local/src/
tar xzf libusb-0.1.12.tar.gz
c. Go to the unpacked directory:
cd libusb-0.1.12
d. Run the configure script:
CFLAGS=-O2 ./configure
e. Run the make command:
make
f. Install the library in /usr/local/lib:
make install
g. Remove libusb libraries that had previously been installed in /usr/lib:
cd /usr/lib
rm libusb*
Note: There is some risk here since you are removing packages that are
part of your Linux operating system. It would be wise to make a
backup copy of /usr/lib/libusb* just in case something goes wrong.
h. Update the library database:
ldconfig

8. udev

Recent linux distributions use udev to manage the usb subsystem. The
instructions given in the last SBIG development package would apply to older
installations that use hotplug. Here we support udev, which is actually simpler
to implement. You might first check that the directory /etc/udev/rules.d/
exists. If so, then do the following

cd xmccd-2.0.4/udev
cp 52-sbig.rules /etc/udev/rules.d

What if you do not see /etc/udev on your system? It may be time to upgrade.
However, the hotplug system works too in the absence of udev. Look in sbig and
follow the directions there. There is no need to install the hotplug files if
your system runs udev.


9. Cinepaint or GIMP

XmCCD produces images in the FITS (Flexible Image Transport System) file format.
The images are 16-bit unsigned integers, at their best when processed for
display with a 32-bit image processing program such as Cinepaint. GIMP, often
included in Linux distributions, will work but it cannot handle the full
dynamic range of images acquired with SBIG CCD cameras.

Cinepaint is a large, complex program and has some dependencies that make it
difficult to install. Look for a package for your distribution, or download the
source from the link on our website and follow their directions.



II. Compile and install XmCCD
------------------------------

Before proceeding make sure you have installed cfitsio, Motif or Lesstif,
and libusb. The libraries must be recognized, so once more try the command

ldconfig

if you have not done so recently.


Set your current working directory to xmccd-#.#/xmccd

cd /usr/local/src/xmccd-2.0.4/xmccd
In this version you must change the filterwheel designation in the source code.
By default it is set for the CFW10 (not 8!). At the same time you may want
to change the labels to match those for your filter sets. In the future
we will provide for a startup file that will make it easier to change
this at run time.


Check in the lines at the top of the file xmccd.c that the filter type
and filter labels match your camera if you are using filterwheel. We will make
this configuration easier soon. The default is the filterwheel for STL-series
cameras with RGBL filters installed.

xmkmf
make
cp xmccd /usr/local/bin/


The XmCCD distribution includes fits file handling utilities that
for preliminary image processing. These are in the fits
subdirectory. From the xmccd-#.# directory

cd /usr/local/src/xmccd-2.0.4/fits
make
make install

The binaries that will be copied to /usr/local/bin provide for dark subtraction,
flat fielding, image arithemtic, spectra extraction parallel to rows or columns,
listing and modifying the image file header.


IV. Test that the USB system recognizes the camera and uploads firmware
-----------------------------------------------------------------------

For the USB system to respond to your camera the file 52-sbig.rules must be
in /etc/udev/rules.d. Try the command

lsusb

and you will see a listing of the devices presently on the bus. With the camera
power off, plug the camera's usb cable into a usb port on your computer. Again,
try the command

lsusb

and in response you should see something like this

Bus 4 Device 1: ID 0000:0000
Bus 2 Device 1: ID 0000:0000
Bus 5 Device 1: ID 0000:0000
Bus 3 Device 1: ID 0000:0000
Bus 1 Device 22: ID 0d97:0101 Santa Barbara Instrument Group
SBIG Astronomy Camera (with firmware)
Bus 1 Device 1: ID 0000:0000

The identification 0d97:0101 is the one for a camera after the firmware has been
uploaded. If the upload was not successful, you will see an identification
such as 0d97:0001, where the second hex number depends on the camera model.


There are (at least) three ways in which this process may fail:


udev does not see the camera (see 52-sbig.rules)
fxload does not upload the firmware (see fxload)
libusb does not recognize the camera (see libusb)

We are testing now with Suse 10.0 and will soon test with Suse 10.1 and
Novell/Suse Enterprise 10.


V. Take images
--------------

As a normal user, connect the camera and turn on its power. After a brief
delay, the fan and "on" light should start. If not, the camera has not been
recognized by the system. If the fan is running, then

xmccd

to connect to a usb camera. The program will spawn ds9, and make a connection
to the camera if it is available. The USB interface is the default, and the
command "xmccd -usb" will force this option but it is not required. The LPT
and ETH interfaces are support by the software, but kernel modules for LPT
are not presently available from SBIG.

ds9 will attempt to display track.fits and image.fits, the default image and
track ccd files. These files should be present in the working directory from
which you start XmCCD. If not, they will be created when you take an exposure.
It is advisable to set aside a directory from which you will run xmccd and in
which the image files will be kept.

Once an image is acquired and visible in ds9, you should save it with the
ds9 command menu "File -> Save Frame As Fits" to whatever name you prefer. Each
subsequent exposure will overwrite previous image.fits and track.fits files.
XmCCD relies on the ds9 user interface to allow you to view and save images.

This version of XmCCD has been tested with ST-7, ST-9, ST-10, ST-2000, STL-6303,
and STL-1001 cameras, the CFW-8, 10 and STL filter wheels, and the original AO
accessory. We have a large AO that we will test soon.

Let us know if there are features we could add that would make
this software more useful for you. See the list in DEVELOPMENT of what we are
planning on soon.


John Kielkopf (kielkopf@louisville.edu)
July 22, 2006