Tips and Tricks

Okay, tips and tricks sounds like I'm a wise old hand at this which is not what I'm trying to say here. However, I like to think I've learned a few things and this section is, in part at least, about some things that I have learned, more like an extended diary of learning experiences, organized topically. When I first started this "hobby" (aka obsession), much of this was hard-won knowledge, some by personal experience (which usually means "past mistakes") and some handed down by folks more experienced but which had to be internalized via my own practice. At this point, much of it seems like common knowledge and, in fact, you can find much of it in books such as those by Robert Reeves.

There's also the "I don't want to forget this because it was painful to learn the first time" factor.

Resources

See my Astronomy Books page for a few books that I have and have read.1 The list is not exhaustive, and the comments barely count as real book reviews, but hopefully that will give you some sense of what is available.

Don Westergren's site has some (dated but) excellent information on film suitability for astronomical photography.


1 Heh, heh. The list of books I have and have not read is rather larger than I care to admit.

Camera Lenses and Testing

I don't have any fancy optical bench equipment, so "testing" is a practical issue: how well do the images look when I use this lens? It never really occured to me until reading Covington and Reeves.

There are two main things to look for when testing a lens. First, is it any good at all; i.e., do the star images focus fairly well across most of the field of view. Second, how much does it have to be stopped down before the images as the edge of the field of view are sufficiently sharp.

My 50-mm f/2 Pentax SMC (used with my Pentax A3000) shows aberrated images when used wide open. I haven't adequately tested it to find the minimum f-stop where the images look good, but at f/4 the star images are quite sharp all the way to the edge of the 35-mm frame. My 50-mm f/1.4 Takamura (used on my Pentax Spotmatic) is another matter....

I took a set of test shots of Lyra ranging from 5 seconds to 120 seconds. All where done from third-floor front porch here in Forest Hills, NY (Queens, NYC). Although the conditions were good (very clear skies, low humidity) for New York City, on the Bortle scale this would rate an 8 or 9. Visually, I could see down to about magnitude 4 at the zenith with averted vision, magnitude 3 with direct vision.

Rather than keep you in suspense, lets just say I was diappointed with the lens' performance. Still, this is preliminary; I need to take a second set of pictures to try to find which part of the optical system was at fault because I was using the lens with a 2X tele-extender and had a Skylight 1A filter in place. I doubt the filter did anything, but I don't think it is coated, so some of the reflections may be due to the filter.

Lens Test, 50mm f/1.4 2X @ f/2.8Lens Test 50mm f/1.4 2X @ f/4
Object Lyra
Location Forest Hills, NY
Time 2001 Aug 25 0200 UT
Camera Pentax Spotmatic, 50 mm f/1.4 lens + 2X tele-extender
Film Fuji Superia X-tra, ISO 800
Exposure 60 seconds at f/2.8 (first) and f/4
Comments Splotch on right hand side of first photo is a development flaw on the print. An airplane flew through the field of view on the second photo.

Severe aberrations affect both images. With the lens at f/1.4 (photo at f/2.8 due to the tele-extender), Vega looks like a brush-stroke. The streak across the middle of both appears to be a reflection but may be a roller mark from the developer. Note that it appears to arc in opposite directions on the two images. Although the second image appears much better, a close inspection of Vega (see below) reveals in interesting, not-quite-symmetric, 6-pointed star. I suspect I have some interesting reflections off the lens' iris which has 6 blades.

Lens Test, Crop of Vega
Object Vega
Comments
Full-scale crop from the better (f/4) image

There are other aberrations visible at the edge of the frame. At first, they might look like field rotation but I was polar aligned more than good enough for this short exposure. Plus, they become very apparent in the close-up shown below: even the airplane's lights are distorted!

Lens Test, Edge Aberrations
Object Frame Edge (Vega)
Comments
Full-scale crop of the airplane track from the second image showing the lens aberrations near the edge

This particular lens combination is definitely a loser for me. I'll probably try again without the tele-extender and with a multicoated Skylight filter (as well as without any filter) to see how the lens performs with settings from f/1.4 to f/4. This camera, the Pentax Spotmatic, is a fully-manual camera which makes it more attractive than my newer Pentax A3000 which requires batteries to hold the shutter open; i.e., the "B" setting is not a mechanical shutter. Unfortunately, they are not lens compatible. The Spotmatic takes the older Pentax screw-mount lenses while the A3000 takes the more common bayonet mount. If it weren't for that, I would just take the newer lens and put it on the older camera.

One thing which is nice to see is that I can easily make out Lyra. The limiting visual magnitude near the zenith was about 3.5; with averted vision it was about 4.5. Near the center of image, there are stars as faint as magnitude 8.

References

DIY: Dew Heaters

Okay, the first thing is that unless you are skilled with a soldering iron, a sewing machine, and happen to have more time than money and maybe also have access to the supplies to make these, you probably want to just fork over the money to buy a commercial solution.  Far be it from me to discourage you, but I have made both my own heater control circuit and my own heaters.  It takes time.  For me it took a lot of time.  After using them for about three years, I bought Dew Not heaters and A Thousand Oaks controller .   I'm not going to show you want I did, because it was a hack using a CMOS 4093 as the timer for the pulse-width-modulation and a relay.  The relay give nice audible feedback in the dark, but they really aren't designed for that sort of repetitive open/close cycle.  Here are some links to sites where the folks actually know what they are doing.

 

DIY: Make Your Own PCBs

No, that's not those poisonous things in electrical transformers, in this context PCB means printed circuit board.

DIY: Webcam modifications

Here are some links to webcam modifications that I found useful.

Eyepiece Projection

Recently we purchased T-adapter and T-ring along with the variable adapter for eyepiece projection imaging. The real intent was to start out taking a series of lunar photos at Newtonian focus using an 35 mm SLR. The 1200 mm focal length of our Newtonian should put an image of the (full) moon approximately 10–11 mm across at the film plane; plenty big enough to make some nice enlargements and yet small enough that we can take pictures even though the telescope is on a Dobsonian mount.

Alas, we discovered what many others have found—the camera will not come to focus due to insufficient in-travel on the focuser. The cure is to obtain an low-profile focuser. Time to spend another USD$80 or so.

However, since we already had the tools for eyepiece projection, I decided to try it by taking a couple of rolls of film of Jupiter. I was a little worried about vibrations due to the mirror slap of the SLR but figured it wouldn't hurt. So, I used 3 rolls of Fuji Superia Xtra ISO 400 film and took multiple frames at each exposure. My effective focal ration was near f/41, so I used the table from the back of Michael Covington's Book and shot frames from 1/4 second all the way out to 1/125 second. For each shot, I refocused using the logic that I couldn't get it wrong all the time. The ground-glass focusing screen in my Pentax Spotmatic made it tough to get the focus, but I could generally tell I must be close because Jupiter's moons would become pinpoints and I could make out a little banding on Jupiter.

The first two rolls had identical exposures and I had one of them pushed one stop. The last roll was the one which extended to 1/125 second, and I had it pushed two stops. Every exposure was repeated 4 or 5 times. Again, the idea was that I hoped to have at least one good frame in the lot.

Now the bad news: I have exactly two frames that have anything remotely resembling Jupiter. The remainer are indistiguishable from a badly out-of-focus picture of a distant light bulb. Clearly, the mirror slap is a bigger issue than I realized, at least at f/41. The two "good" frames (and I use that term quite loosely) were taken at 1/125 second. Oh, and did I mention that I took the film to a professional shop where I had it all developed, printed, and a set of contact sheets done for USD$80? Ouch!

All hope is not yet lost for our original project, taking moon pictures. At f/8, the effects of mirror slap should be less noticable. Plus, except for the smaller crescent phases, there should be enough light that, with moderately fast film, the exposure should be very short hopefully "freezing" the slap. That's what I think saved the two frames which came out showing at little of Jupiter's banding.

The moral: for planetary shots, you probably want a camera with mirror lock up.

Focus Testing

Robert Reeves suggests testing the focus of your lenses as the infinity mark cannot always be trusted. This isn't necessarily because the manufacturer was sloppy; certain long focal-length lenses may significantly affected by temperature and at some temperatures they will focus beyond infinity (Buzz Lightyear, take note).

I decided to do a quick test of the 50-mm f/2 lens on my Pentax A3000. The test involves making a Hartman mask for the lens and shooting a set of star trails, each with a slightly different focus. The first step was to print a small label with lines at intervals of about 2-mm which I could attach to the camera lens where the distance calibration marks are located. This allows me to carefully turn the focus ring in steps of about 1-mm. I focused, per Reeves' suggestion, starting from the closer settings toward infinity, stepping 1/2-mark without ever backing up to insure that the gear mechanism is fully engaged with no backlash.

I used Lyra as my target area simply because it was roughly overhead at the time which allows me to easily point without having any local street lights shine into the camera. Since my camera does not allow multiple exposures on the same frame, I used the "hat-trick" though in my case it was a black fleece glove. The first exposure was for 60-seconds. I then covered the lens with the glove and adjusted the focus ring. I then took a 30-second exposure and repeated. Making the first exposure longer than the others allows you to easily tell from the resulting photo which end is the starting point.

Focus Test, 50mm lens on Vega
Object Vega and Epsilon Lyra
Location Forest Hills, NY
Time 2001 Aug 30 0300 UT
Camera Pentax A3000, 50 mm f/2 lens
Film Fuji Superia X-tra, ISO 800
Exposure First trail is 60-seconds, subsequent trails are 30-seconds each
Comments Highly enlarged section. A gentle unsharp mask was applied. North is roughly up; the stars are trailing to the west (right).

Below is a close-up of one section of the print showing Vega and Epsilon Lyrae. What I expected to see was a series of double trails for each star. Each pair would be closer together than the previous pair with them eventually converging into a single trail and possibly spreading apart again. Since I only see one trail (the double trail for the upper star is because Epsilon Lyrae is a double; there really are two stars there), my tentative conclusion is that focusing is not very critical for a 50-mm lens.

However, I'm not quite willing to stand on that just yet. Among other things, I'm not sure about the orientation of the Hartman mask so it is possible that the reason that I don't see two trails is because they are co-linear instead of being parallel; i.e., maybe I need to rotate the mask 90-degrees and try again.

References

 
 

 

Gradient Removal with Picture Window Pro

I purchaseed Picture Window Pro 3.1 after seeing a large number of people on APML mention using it for image processing. I've only been using a couple of weeks at the time of this writing, but so far I am quite happy with it. Picture Window Pro is happy to do a lot of tings with 48-bit images that Photoshop does grudgingly (if at all). It also seems to run faster as it should: it is nowhere near as feature rich as Photoshop as it does not need all of the graphics arts tools.

Here is a short version of how I processed my constellation portrait of Hercules. Some of the steps here involved trial-and-error; I'll save you tedium of reading through that, but will point out where I had to try more than once.

Step Zero: The Raw Image

Obviously, the starting point is the raw image. In my case, I scanned my slide using VueScan for Linux and saved the raw image. I purchased VueScan in part because I heard good things about it and in part because I wanted a comparison of using it instead of one of the SANE tools (e.g., xsane, scanimage, xscanimage, etc.). I've concluded that I could have happily continued using SANE without any problems. More on that elsewhere.

Raw scan of Hercules slide
Object Hercules
Comments This is the raw scan data (scaled down and converted to JPEG). Note the mild gradient toward the west (lower right).

Step One: Synthetic Sky Glow Maps

Hercules was high enough in the sky that I really didn't expect to have any problems with sky glow, yet the film clearly shows some glow on the western side. Fortunately, Hercules contains no significant nebulosity nor does the Milky Way appear in the field of view. This makes it possible to use the simplest of all possible gradient removal methods, a wide Gaussian blur (Transformation -> Blur). I used a 100-pixel radius Gaussian blur which completely obliterates any stars.

Why do we do this? Well, in some sense this step is like a dark frame that CCD imagers take. The question is, in the absence of any stars, what does the image look like? The problem is that there is light reaching the camera that has nothing to do with the stars and which is not internal (like CCD dark current).

Gaussian blur of Hercules showing gradient due to sky glow
Object Hercules
Comments Image of Hercules after 100-pixel radius Gaussian blur. Nothing is left except a mild gradient caused by local light pollution.

Step Two: Gradient Removal

Once you've created a gradient using the Gaussian Blur, it gets removed by using the Composition tool (Tranformation -> Composition). From this tool, you can select which two images are to be combined and how. Subtract the blurred image from the original. I chose to subtract 90% of the blurred image. I knew I wanted to subtract less than 100%, but how much less was a matter of trial and error. I started out subtracting only 50%, but by the time I finished my latter steps (i.e., a midtone stretch) the gradient from the sky glow had reappeared.

Hercules image after subtracting the gradient
Object Hercules
Comments Image of Hercules after subtracting the gradient created by the 100-pixel radius Gaussian blur.

Note that the image appears somewhat dark. Subtracting out the sky glow results in darkening the entire image but that's okay, we can "fix" that up by some contrast stretching later.

Step Three: Contrast/Level Adjustment

Here I chose to use Picture Window Pro's Transformation -> Gray -> Levels and Color menu as the quick way to get the effect I wanted. You should be able to do the same thing by adjusting the curves. From the Levels and Color menu, I boosted the midtones by about 65% but made no adjustments to the color saturation. Quite frankly, it already looks pretty colorful to me. The 65% figure was a matter of trial and error and you could pick something different based on taste.

Hercules image midtone stretch.
Object Hercules
Comments Image of Hercules after boosting the midtones by 65%.

Step Four: Unsharp Mask

Quite frankly, at this image scale, the effect is irrelevant. An unsharp mask should really be done at the image scale where you plan on displaying the final results. I.e., if you unsharp the original image (scanned at 2400dpi) and then reduce the image by a factor of 10-15 (like this one), you've wasted your time. Of course, you might not have spent much time, but the point is that the unsharp mask is a small effect at this image scale. If you plan on making a print at full scale, then the step is worthwhile.

In my case, an unsharp mask with a radius of 2 and boost of 100% did a nice job of tightening up the image. Radii larger than 3 resulted in stars starting to spread out again. Since the result had no effect at the resolution used on this page, I've skipped the image. As an FYI, you should really do the unsharp mask at the display resolution since a rescaling destroys the results.

Hercules, unsharp mask
Object Hercules
Comments Image after mild unsharp mask.

Step Five: What did I do?

I have no idea. I did an extra step before saving the image, but I don't know what it was. There is very little change to the final result, so it was obviously not very important. And it definitely does not show up at the resolution of these images.

Summary

Below are the images in sequence showing the progression. Note that once the midtone-stretch is complete, there is no significant change to the image at this resolution. In fact, except for the full scale image, the effects of the unsharp mask are insignificant. I said it earlier but I'll say it again: you should really do the unsharp mask at the display resolution since a rescaling destroys the results.

Raw scan of Hercules slide Gaussian blur of Hercules showing gradient due to sky glow Hercules image after subtracting the gradient
Hercules image midtone stretch. Hercules, unsharp maskHercules, unknown modification, final result
Object Hercules
Comments Image processing sequence. From top left: raw image, gaussian blur (background), background subtracted, midtone stretch, unsharp mask, unknown final modification.

SANE vs VueScan

SANE, Scanner Access Now Easy, is the Linux framework for interfacing with scanners. There are a number of tools for doing the actual scanning. The most primitive one is called scanimage. It is a command-line tool which, for my purposes, is perfect. In its default mode it yields a raw scan image with no corrections. Since this is what you generally want for processing your images, you don't really need to buy VueScan. VueScan will take care of some things for you that scanimage won't such as compensating for film base color. For slides this is irrelevant, but for negatives it's a nice feature, at least for normal daytime shots. Since astrophotos are likely to need color balance changes anyway, there is little motivation to do a partial job in the scan step.

However, some of my contentment may be due to ignorance. In particular, the documentation of SANE's Epson driver and that of VueScan leave a bit to be desired. It is unclear to me how much control over the scanner I have while it is still doing the scanning in analog mode.

I mentioned that scanimage is a command-line tool. After a bit of work, I put together a shell script which will automatically scan specific locations on the strip holder. I can now run that, launch it into the background, log out and go away while the scanning takes place. VueScan has a batch mode which is similar but requires you to keep the GUI up and running. VueScan also seems to keep the scanner active between scans even when it is idle.

The short of it is that VueScan doesn't really give me anything that scanimage doesn't for astrophotography. However, if you are not comfortable with the command-line on Linux, VueScan gives a nice interface that does make scanning very easy.

SBIG Cameras on Linux

I've been fighting with Windows XP for a long time trying to get everything working satisfactorily. As usual, easy things are easy, but hard things are impossible. Sigh. I am no fan of Windows, but Linux has simply not had the tools to get up and running quickly. But after wasting yet another night with having to find and download missing DLLs (this time, msstdfmt.dll which according to some web sites comes with XP but I can't find it on my CD-ROM and according to others it's part of the Visual Basic Runtime but the Microsoft download for VB 6.0 SP5 didn't include it and their web site indicates it won't be included with Vista---did they remove it early?) I've launched back into trying to get things working.

First, XEphem is a very good tool for starting. So is KStars, though XEphem is oriented more toward science. And the INDI platform is analogous (if more less pervasive and having fewer drivers) to ASCOM. So all I really need is to get the camera to boot and demonstrate that I can aquire images. Okay, there's really more. What I'm aiming at is something like ACP.

The title of this section is "SBIG Cameras on Linux" which is a bit grandiose since I have exactly one SBIG camera, an ST-7XE NABG along with their color filter wheel CFW-8A.

Loading the Firmware

First you are going to need to download the SBIG Linux Development Kit. If you have a 2.4 series kernel, or an early 2.6 series kernel that uses the hotplug system, follow the directions in their README. If you have a more recent kernel that uses the udev system and you have a USB-based camera read on.

You are going to need to create one file in /etc/udev/rules.d in order to load the firmware. You are also going to have to copy the firmware files someplace "global." The canonical location for firmware files is now /lib/firmware. In principle, the udev system will even take care of loading the firmware, but it requires cooperation from the device driver and we're going to be using libusb (I only have a USB camera), so there is no driver per se.

Create a file in /etc/udev/rules.d (I named my "sbig.rules") with a suffix of ".rules". Add the following to it. I've used backslashes to indicate continuation and that actually works in the file. There are circumstances under which you don't need them, but I haven't quite figured out the rules and in some cases, when they are missing, the camera ends up in an endless cycle of loading firmware.

# udev's /sbin/firmware_helper won't work for this since the driver
# doesn't set up the correct files. There's probably some way for
# that to be hacked here but I don't know how....

BUS=="usb", ACTION=="add", \
SYSFS{idVendor}=="0d97", SYSFS{idProduct}=="0001", ENV{DEVICE}!="", \
RUN+="/sbin/fxload -D $ENV{DEVICE} -I /lib/firmware/sbigucam.hex"

BUS=="usb", ACTION=="add", \
SYSFS{idVendor}=="0d97", SYSFS{idProduct}=="0002", ENV{DEVICE}!="", \
RUN+="/sbin/fxload -D $ENV{DEVICE} -I /lib/firmware/sbiglcam.hex"

BUS=="usb", ACTION=="add", \
SYSFS{idVendor}=="0d97", SYSFS{idProduct}=="0003", ENV{DEVICE}!="", \
RUN+="/sbin/fxload -D $ENV{DEVICE} -I /lib/firmware/sbigfcam.hex -t fx2"

# This is the ID presented once the firmware has been loaded.
BUS=="usb", ACTION=="add", \
SYSFS{idVendor}=="0d97", SYSFS{idProduct}=="0101", \
MODE="0666", SYMLINK+="sbig.%n"

There's only one thing missing to make this work: the program fxload. fxload is/was a part of the hotplug system which, being deprecated, is probably not on your system anywhere. So you're going to need to get a copy. The easiest thing to do (well, it was the easiest for me anyway) was to grab the RPM from the hotplug sourceforge repository and then use file-roller to extract the program which then needs to be copied to /sbin. Once your done those three things, you are ready to plug in your camera. What three things?

  1. Copy the SBIG-supplies firmware files to /lib/firmware. The SBIG README says to copy them to /usr/share/usb; ignore that. Uhm. Apparently SUSE 10.x does use that location, but it doesn't exist on Fedora Core 5. So, where ever you put them, make the sbig.rules flie consistent with that location.
  2. Create the above /etc/udev/rules.d/sbig.rules file.
  3. If you don't already have fxload, obtain fxload from the hotplug distribution and put it in /sbin.

Plug in your camera, both to the USB port of your computer and to power. The LED on the back of the camera should flicker briefly as the firmware downloads followed by it coming on steadily and the fan turning on. If not, double check all the usual suspects: did you really copy those files in the right places, are the firmware files readable, is fxload executable?

If the camera came on (as evidenced by the LED and fan), then congratulations, you've made it past the first hurdle.

SBIG ST-402/1603/3200

These cameras have a two-stage loader. I don't own one, so I can't actually test the install procedure, but Jan Soldan has been working with SBIG to get this to work correctly. The above directions won't work if you have to copy of the SBIG Linux development kit from the SBIG web site. That's because the second stage loader wants the firmware to live in /usr/share/usb. So you can either modify the above to put everything in /usr/share/usb, per the SBIG directions, you can put it in both locations, or you can put it in one and create symbolic links from the other.

If you have the kit from Jan, you can put everything in /lib/firmware.

Device Permissions

Fedora Core 5 is no longer bleeding edge, but its version of udev is newer than that installed on, for example, SUSE, RHEL4 and its derivatives (e.g., CentOS or Scientific Linux). That seems to be the cause of a discrepency between my udev rules file above and the one Jan Soldan is distributing. Jan needs to run an external script after the device is created in order to set the permissions on /proc/bus/usb/X/Y (X and Y are the bus and device numbers). Fedora Core 5 creates that node, but all I/O seems to go through the equivalent /dev/bus/usb/X/Y which the MODE=0666 directive modifies. It is unclear to me why Fedora Core 5 creates both but only applies the permission change to one. Since I don't have SUSE, I can't comment on what exactly is going on there.

Getting the Test Application to Work

Should be easy, right? Delete the object files, recompile, run.

Well, not quite. As the README will point out, you need to copy the shared objects (libraries) to a "global" location, /usr/local/lib is recommended. Also, due to the way one(?) of them was linked, it requires that libusb.so be in /usr/local/lib. The recommended way to "fix" that is to create a symbolic link from /usr/local/lib/libusb.so to where the real library is, which should be /usr/lib/libusb.so.

After doing that, you will need to run ldconfig to rebuild the cache of library locations. This happens automatically on reboot, so this step is a once-only and only required to access everything immediately. You may also need to add /usr/local/lib to the set of directories searched by ldconfig. Fedora Core 5 does not search there by default. To do this, I added a file /etc/ld.conf.d/local.config with the single line "/usr/local/lib" before running ldconfig. Okay, let's recapitulate:

  1. Copy the SBIG shared libraries (".so" files) to /usr/local/lib.
  2. Create the symbolic link, cd /usr/local/lib; ln -s /usr/lib/libusbs.so .
  3. Create the file /etc/ld.config.d/local.config with the one line "/usr/local/lib".
  4. Run ldconfig.

Now you're ready to delete those object files (".o" files) and rebuild the test application.

Sigh. Well, it turns out there is a bug somewhere that causes the attempt to establish a link to the camera to fail randomly. It usually succedes, but sometimes fails. Once it fails, it is often hard to get out of that state using the supplied code. It turns out that the "fix" is simple: try again. So, in the file csbigcam.cpp, change the method EstablishLink(void) to read as follows:

PAR_ERROR CSBIGCam::EstablishLink(void)
PAR_ERROR res;
EstablishLinkResults elr;
EstablishLinkParams elp;

/* For reasons unknown at present, a single attempt to establish the
link may fail. But it seems to always work within 5 tries. Be
generous and give it 10. */
for (int i = 0; i < 10; i++) {
res = SBIGUnivDrvCommand(CC_ESTABLISH_LINK, &elp, &elr);
if ( res == CE_NO_ERROR ) {
m_eCameraType = (CAMERA_TYPE) elr.cameraType;
return res;
}
cout << "failed to establish link, will try again" << endl;
// sleep(1);
}
return res;
}

The above is not required if you are using the version of the libraries distributed by Jan Soldan (and hopefully soon by SBIG) but does not real harm either.  Jan has worked with SBIG to get libsbigudrv.so modified to include the retry logic directly.  Without that, every application that connects to the camera would need to do something like the above.

Now you're almost ready to recompile. The file testapp_main.cpp establishes two camera connections, one via USB and one via LPT. Since I'm only dealing with the USB camera and since it is unlikely that you have both connected, edit that file and remove everything referencing the LPT camera.

Now you're ready to recompile. Reality check---fix your compilation errors. Then you should be able to run "./testapp" and be rewarded with output that looks something like this:

278 roland> ./testapp 
Creating the SBIGCam Object on USB...
Establishing a Link to the USB Camera...
Link Established to Camera Type: ST-7
Taking light image on USB...
Saving compressed image...
Closing Devices...
Closing Drivers...
SUCCESS
Hit any key to continue:

WARNING: The INDI 0.4 release includes a dummy driver for libsbigudrv.so in order to be able to compile.  The driver can be overwritten with the real driver after installing INDI and everything will work.  Unfortunately, if you install the library before installing INDI 0.4, the latter will overwrite your good library with the dummy version.  This has been fixed in subversion and will certainly be part of the 0.5 release.

Getting st7ctl to Work

Justin Pryzby's st7ctl program is the only program I currently have to controlling the ST7. "Getting it to work" involves installing a large number or pieces for it's various bits of functionality. I'm going to focus only on basic communication with the ST7 since once that's done, you'll have everything you need to acquire images. Autoguiding is a different beast and once I have that mastered, I'll add some comments.

st7ctl has the same "problem" as the SBIG test application: the initial connection to the camera can fail. And it has the same cure: try again.

In ctl/args-info.c change the function getinfo() to read:

extern void get_info(void)
{
GetDriverInfoParams gdip;
gdip.request=DRIVER_STD;
SBIG(CC_GET_DRIVER_INFO, &gdip, &gdir0);
if (parms.info) driver_info("Highlevel driver:", &gdir0);

gdip.request=DRIVER_EXTENDED;
SBIG(CC_GET_DRIVER_INFO, &gdip, &gdir0_2);
if (parms.info) driver_info("Lowlevel driver:", &gdir0_2);

EstablishLinkParams elp;
elp.sbigUseOnly=0;
{
int i;
for (i = 0; i < 10; i++) {
SBIG(CC_ESTABLISH_LINK, &elp, &elr);
if (elr.cameraType==NO_CAMERA) {
fprintf(stdout, "No camera found!\n");
exit(1);
}
}
}

GetCCDInfoParams gcip;
gcip.request=CCD_INFO_IMAGING;
SBIG(CC_GET_CCD_INFO, &gcip, &gcir0);
if (!gcir0.readoutModes) {
fprintf(stderr, "No readout modes!! WTF!!\n");
exit(1);
}
if (parms.info) ccd_info0("Imaging camera:", &gcir0);

gcip.request=CCD_INFO_TRACKING;
SBIG(CC_GET_CCD_INFO, &gcip, &gcir0_2);
if (parms.info) ccd_info0("Guiding camera:", &gcir0_2);

gcip.request=CCD_INFO_EXTENDED;
SBIG(CC_GET_CCD_INFO, &gcip, &gcir2);
if (parms.info) {
printf("Camera system:\n");
printf("Bad columns: %d\n", gcir2.badColumns);
printf("Imaging ABG: %d\n", gcir2.imagingABG);
printf("Serial number: %s\n\n", gcir2.serialNumber);
}

gcip.request=CCD_INFO_EXTENDED2_IMAGING;
SBIG(CC_GET_CCD_INFO, &gcip, &gcir4);
if (parms.info) ccd_info4("Imaging camera", &gcir4);

gcip.request=CCD_INFO_EXTENDED2_TRACKING;
SBIG(CC_GET_CCD_INFO, &gcip, &gcir4_2);
if (parms.info) ccd_info4("Guiding camera", &gcir4_2);

ReadOffsetParams rop;
rop.ccd=CCD_IMAGING;
SBIG(CC_READ_OFFSET, &rop, &ror);
if (parms.info) offset_info("Imaging offset:", &ror);

rop.ccd=CCD_TRACKING;
SBIG(CC_READ_OFFSET, &rop, &ror_2);
if (parms.info) offset_info("Guiding offset:", &ror_2);

SBIG(CC_GET_LINK_STATUS, &rop, &glsr);
if (parms.info) {
printf("Linked: %d\n", glsr.linkEstablished);
printf("Address: 0x%x\n", glsr.baseAddress);
printf("Camera: %d\n", glsr.cameraType);
printf("Communications count: %ld\n", glsr.comTotal);
printf("Failed communications count: %ld\n\n", glsr.comFailed);
}

set_temp();
get_temp();
}

This does the same try, try again as we did in the SBIG test application. Similarly, in ctl/st7ctl.c, change the function SBIG to read:

extern void SBIG(short cmd, void *parms, void *results)
{
GetErrorStringParams gesp;
GetErrorStringResults gesr;

/* For reasons unknown, the camera may not establish a link on the
first try. It seems to always work within 5 attempt, but we are
generous and give it 10. Other commands should work just fine
without retry once a connection has been established. */
int i;
for (i = 0; i < 10; i++) {
gesp.errorNo=SBIGUnivDrvCommand(cmd, parms, results);
if (cmd != CC_ESTABLISH_LINK) {
break;
} else if (gesp.errorNo == CE_NO_ERROR) {
break;
}
}

if (gesp.errorNo) {
int i;
i=SBIGUnivDrvCommand(CC_GET_ERROR_STRING, &gesp, &gesr);
if (i) {
fprintf(stdout,"Command 'CC_GET_ERROR_STRING'"
" failed!\nThe error string will"
" be printed anyways;"
" don't trust it.\n");
}

fprintf(stdout, "\a\aError: %s\a\a\n", gesr.errorString);
}
}

Then build everything. Once it is built, change to the ctl directory and run "./st7ctl --info" and you should be rewarded with something like this:

281 roland> ./st7ctl --info
Highlevel driver:
Version: 04.43
Name: libsbigudrv Ver 4.43-LINUX,
Request Limit: 1

Lowlevel driver:
Version: 00.10
Name: libusb system driver,
Request Limit: 1

Imaging camera:
Firmware Version: 02.41
Camera: 0x4
Camera: SBIG ST-7 Dual CCD Camera
Mode count: 10
Mode ID, Width, Height, Gain (e-/ADU), Pixel width (microns), Pixel height (microns)
0 765 510 02.41 000009.00 000009.00
1 382 255 02.41 000018.00 000018.00
2 255 170 02.41 000027.00 000027.00
3 765 0 02.41 000009.00 000009.00
4 382 0 02.41 000018.00 000009.00
5 255 0 02.41 000027.00 000009.00
6 765 510 02.41 000009.00 000009.00
7 382 255 02.41 000018.00 000018.00
8 255 170 02.41 000027.00 000027.00
9 85 56 02.41 000081.00 000081.00

Guiding camera:
Firmware Version: 02.41
Camera: 0x4
Camera: SBIG ST-7 Dual CCD Camera
Mode count: 2
Mode ID, Width, Height, Gain (e-/ADU), Pixel width (microns), Pixel height (microns)
0 190 162 01.38 000013.75 000016.00
1 95 81 01.38 000027.50 000032.00

Camera system:
Bad columns: 0
Imaging ABG: 0
Serial number: 02073118

Imaging camera:
Frame transfer: 0
Electronic shutter: 0
dumpExtra: 5

Guiding camera:
Frame transfer: 0
Electronic shutter: 0
dumpExtra: 0

Imaging offset: 804
Guiding offset: 962
Linked: 1
Address: 0x0
Camera: 4
Communications count: 18
Failed communications count: 0

Temperature regulation on?: 0
Regulation frozen?: 0
Setpoint (Celsius): 26.827324
Percent power: 0.000000
CCD temperature (Celsius): 27.436655
Ambient temperature (Celsius): 25.000000

If you really want to try your luck, you can issue other commands to take exposures, turn on cooling, or change filters. Of course, if you're testing while sitting at the table with the camera lying there capped (as I am while I write this), your images may be a tad boring but you will have the satisfaction of knowing it is working.

Getting INDI to Work

INDI 0.4 has several problems that prevent the SBIG driver from working. These are the result of some last-minute changes in the SBIG code that were intended to standardize the driver to use cfitsio for all FITS file handling. Unfortunately, the changes were incomplete resulting in part of the code using cfitsio and part of it trying to manipulate the data directly. In some cases, the data was transformed from native format to FITS format twice resulting in just plain broken data.

This problem has been fixed in subversion and will certainly be part of the 0.5 release. Meanwhile, download from sourceforge and build. The subversion copy also detects whether or not you already have libsbigudrv.so and cfitsio installed and, if so, skips building cfitsio and skips installing libsbigudrv.so.

I can happily attest that the latest version works wonderfully with my ST7 for image acquisition and, when run from withing XEphem, I had no difficulty slewing my Gemini GM-8 to targets, acquiring images, and doing plate reductions.  There's still some work to be done with autoguiding (or maybe I just haven't figured out how to do it yet), but the system is at least marginally workable.

Caveat Installer

I spent quite a bit of time trying to figure out why the SBIG driver presented itself to XEphem via INDI but was completely unusable. It turned out that I had no less than three installations of INDI on my system and the most recent version was not the one in the front of my path, so I was using an older version. I konw, you would never make such a stupid mistake....

Getting Audela to Work (Not Yet)

If you're reading this, I assume it is because your an English speaker. If you're a French-speaker, you should look at the Audela pages where the real documentation is in French. I don't read (or speak) French, so I've had to do this by trial and error which is also the method that Google's translation service seems to use (ugh).

There is one report in the Audela website/testing results indicating that Audela does not with with Fedora Core 3, or seemingly with anything after RedHat 9. Maybe, I'm not that far yet. But the first problem I encountered was that Audela would not compile. There seem to be two things. First, there is a small error in a header file which the current g++ compiler will not let pass. Second, if you don't have any Finger Lakes Instruments equipment, you can safely delete two items from the configure script that prevent the build.

  1. Edit the file src/audela/libaudela/src/cerror.h and remove the extra CError:: from the declaration of the message method on line 87.
  2. Run the configure script as documented. After it completes, edit the file src/Makefile.defs and remove the reference to "fli" and "fingerlakes" in the two lists you will find there. Now you are ready to follow the remainder of the build instructions.
  3. (1.4.0-beta1 only) Edit src/libcam/libethernaude/src/camera.c. There is a block of diagnostic code near the bottom which using sprintf and references cmdline, a variable which is defined in an #ifdef OS_WIN. Put the entire block inside an #ifdef OS_WIN. It will be obvious what I'm talking about once you look at the file.

Congratulations, you should now be able to build Audela using the instructions in the top-level readme.txt (which is also in French, but the instructions like "./configure" and "make external" don't need translation).

Unfortunately, at this point I'm stumped. The instructions don't tell you this, but all your code is now in the ./bin subdirectory and you can launche audela by changing to that directory and running ./audela. But neither the tutorial nor the test work for me, both want to connect to the audine camera (which I most definitely do not have) and the GUI is still in French (but I can kind of follow it).

Worse, it looks like audela wants to talk to all the cameras via a parallel port (except for webcams which use Video4Linux).

And lastly, while there is nominal support for digital cameras, Aud'ACE does not recognize any of my serial ports (I do have one native serial port which it should see when it launches), so I can't even set up a fake camera.

Other problems include:

  • I can't get tkimg to compile on FC5.  The latest version is 1.3 and I'm getting an error while configure tries to evaluate part of it's script.  Oddly, the part it is choking on works fine when I manually type it into the shell, so I'm at a loss.  I've tried running autoreconf and autoconf and both complain about direct use of LIBOBJ instead of AC_LIBOBJ and refuse to reconfigure.  So I can't use the Img extension.