Contents


Michael Richmond richmond@astro.princeton.edu
Dec 1, 1996

I went up to Vermont for Thanksgiving, and discovered that the liquid which cools the TE units had frozen in its plastic tubing! I guess this shouldn't have been a surprise, since it gets pretty cold up there, and the tubing runs for 40 feet from a basement, under the lawn, to the cameras (and back).

Fortunately, there was a solution. I found two hair dryers, placed one at each end of the PVC pipe running from camera to basement, and let them run for about an hour. It was quick work to thaw out the exposed tubing near the camera itself, but it took quite a while to get rid of the ice in the middle of the tubing. At last, however, after turning on the pump, I saw the bubbles move. Phew.

So, I picked up 7 gallons of antifreeze (the non-toxic kind) and added them to the 25 gallons of water (which already had a little antifreeze in it). In addition, I've left the pump running, hoping that if the water flows 24 hours a day, all winter long, it's less likely to freeze.

While I was there, my brother and I drilled a hole in the floor so that we could run a telephone wire down from the first floor to the basement. I'll pick up a modem sometime this week, and install it on my next trip up to Vermont. My hope is that I can keep the PC running Linux continuously, programming it to fire up the (soon to appear) Linux data-aq during the night, reduce the data from images to star lists in the morning, and finally transfer the star lists over the phone to a machine down here in New Jersey.


Jure Skvarc SKVARC@eros.ijs.si
Dec 1, 1996

This week I downloaded images Chris Albertson put on his FTP server. I have remark or two considering the format of images.

I suspect I am a bit responsible for the first thing. Namely, the BZERO value in the FITS header is set to 32768. This is nice if we want to have pixel values from 0 to 65535, what is the only natural and I also wrote this value in the Technical note 4. However, when I wanted to see these images using Fitsblink program, the CFITSIO library complained because of the overflow. The reason is that it supports only signed 16-bit integers which have range from -32768 to 32767. I made a workaround in the program, but I wonder shouldn't image files be more compatible with CFITSIO library. This would mean that we put BZERO back to 0. Of course, it is always possible to handle this problem in a program which reads images, but it introduces some complications. What do others think about this?

The other question I have is what is on the left and right side of the image. On both sides there is a strip of pixels with values which are very different from values of the sky and stars. If these are values of the covered pixels or anything like that I suggest to remove them or to put them in an extension of the FITS file. I think that now they only confuse programs which read such images.

Also I would like to announce Fitsblink 1.2. There are no functional changes from the previous version but I removed some bugs and made some code-cleaning (and new bugs, I suppose). Now you can read TASS images as they are (with BZERO=32768). It is also easier to download sources because they are separated from test images. Along with binary versions for HPUX and linux they can be found on the locations: http://kronos.ijs.si/~jure/fitsblink/fitsblink.html and http://www2.ijs.si/~skvarc/fitsblink/fitsblink.html

I will appreciate bug reports, suggestions and other remarks to my email. Thank you.


Norman Molhant molhant@ERE.UMontreal.CA
Dec 1, 1996

> This week I downloaded images Chris Albertson put on his FTP server.  I have 
> remark or two considering the format of images.  
> 
> I suspect I am a bit responsible for the first thing.  Namely, the BZERO 
> value in the FITS header is set to 32768.  This is nice if we want to have 
> pixel values from 0 to 65535, what is the only natural and I also wrote 
> this value in the Technical note 4.  However, when I wanted to see these 
> images using Fitsblink program, the CFITSIO library complained because of the
> overflow.  The reason is that it supports only signed 16-bit integers which 
> have range from -32768 to 32767.  I made a workaround in the program, but I 
> wonder shouldn't image files be more compatible with CFITSIO library.  This 
> would mean that we put BZERO back to 0.  Of course, it is always possible to 
> handle this problem in a program which reads images, but it introduces some 
> complications.  What do others think about this?
Well, the problem here is that the CFITSIO library is bugged: it is not 100% compatible with the FITS standard in that the standard does not disallow the use of data with 16 significand bits (instead of 15): the conversion we do (using a BZERO equal to 32768) is perfectly all right for the FITS standard. So, rather than throw away one bit in every pixel we have, let's correct the CFITSIO library, I say.
 
> The other question I have is what is on the left and right side of the 
> image.  On both sides there is a strip of pixels with values which are very 
> different from values of the sky and stars.  If these are values of the 
> covered pixels or anything like that I suggest to remove them or to put them
> in an extension of the FITS file.  I think that now they only confuse 
> programs which read such images.
Sorry, but I disagree: the files generated by the data acquisition program (tm3get10) are *raw* data files, and as such contain *all* the acquired data. Sure enough, those files were not designed to be seen. These strips of pixels (some of which are not pixels at all, but temperature, voltage or current measurements) are to be used during the image reduction steps, i.e.: estimation of an appropriate dark line (this requires the temperature data and may make use of the blind pixels strips left and right of the image), substraction of said dark line, division by a standard gain line (i.e.: "flat fielding"), removal of damaged lines (this is where voltage measurements are useful: data taken with the nominal +5 volts down to +3 volts are pretty much useless), etc.

A fairly complete description of these strips of pixels is to be found in the data acquisition program's documentation, i.e.: tm3get10.htm, available at Michael's TASS home page on the WEB. If you can't get it from there, please tell me: I'll email a copy of that doc to you.

Naturally enough, these strips of non-imaging pixels should be removed after that stage, and an appropriate temperature entry made in the FITS header instead, giving the average temperature and its standard deviation (both in celsius). That work, however, should not be done by the data acquisition program. It is the job of the image reduction program to transform these raw data files into clean image files. Then the data reduction program should extract light source coordinate files from these clean image files, etc.

> Also I would like to announce Fitsblink 1.2.  There are no functional 
> changes from the previous version but I removed some bugs and made some 
> code-cleaning (and new bugs, I suppose).  Now you can read TASS images 
> as they are (with BZERO=32768).  It is also easier to download sources 
> because they are separated from test images.  Along with binary versions for 
> HPUX and linux they can be found on the locations:
> http://kronos.ijs.si/~jure/fitsblink/fitsblink.html  and
> http://www2.ijs.si/~skvarc/fitsblink/fitsblink.html
Thanks for a nice program!


Chris Albertson chrisa@wavenet.com
Dec 1, 1996

> This week I downloaded images Chris Albertson put on his FTP server.  I have
> remark or two considering the format of images.
> 
> I suspect I am a bit responsible for the first thing.  Namely, the BZERO
> value in the FITS header is set to 32768.  This is nice if we want to have
> pixel values from 0 to 65535, what is the only natural and I also wrote
> this value in the Technical note 4.  However, when I wanted to see these
> images using Fitsblink program, the CFITSIO library complained because of the
> overflow.  The reason is that it supports only signed 16-bit integers which
> have range from -32768 to 32767. 
Read on, I think I agree with you. BUT...

I just pulled out my copy of the FITS standard. I think the FITS files written by Norman's program are technically correct by the standard. Also by the standard I think the CFITSIO library must be in error. Here is my reasoning:

The software (fits reader) I use does the correct thing. If BZERO and BSCALE are present and BSCALE is non-zero it returns type floats. Is there a way to get CFITSIO to give you floats? Using floats is the best approach because (as you know) it is possible for a valid FITS file to overflow a 16-bit signed int.

All that said, I see no reason not to set BZERO = 0.0 or to simply remove the B* header lines completely. From my point of view it make no difference what the B* lines are set to.

I do think the array should continue to contain ADU values exactly as they came off the ADC chip.

> The other question I have is what is on the left and right side of the
> image.  On both sides there is a strip of pixels with values which are very
> different from values of the sky and stars.  If these are values of the
> covered pixels or anything like that I suggest to remove them or to put them
> in an extension of the FITS file.  I think that now they only confuse
> programs which read such images.


Joe Ronchetti jronchetti@earthlink.net
Dec 1, 1996

When I convert fits values to true pixel values I get a range from 0 to 65000 or so. The majority of pixels seem to be between 9000 and 14000. What is the lowest value to consider above dark current and what is the highest to consider below hot pixels and such?


Chris Albertson chrisa@wavenet.com
Dec 1, 1996

Joe Ronchetti brings up an interesting question.

At first I thought that the range 0..65000 came from the fact that I was including the "edges", the peudo-pixels along the edges of the raw data files that contain things like masked cells and instrumentation values.

It does seem very odd that the (12 or 14 bit I forget) wide ADC can generate ADU values with such a wide range (0..65K should require 16bits)

But no, I can find very small subsections of the image that contain the full 0..65K range. For example, in 30t0337_269 there are several bright stars that are saterated. These stars come right up from the background and then contain a "hole" in the middle. The hole is a bunch of zero ADU values in the center of the star. Typicaly the 65K ADU values are directly adjacent to the 0 ADU values. I think it may be caused by the ADC chip wrapping when it is fed a voltage it can not handle. I am not an expert on how this process works.

Here is an example: The index numbers assume the first cell = 1 (not 0) My first step on reading the file is to convert to floating point. It avoids numeric problems. (taken from 30t0337_269)

       231   232   233   234   235   236   237   238   239   240   241 
 584 1.4E4 1.4E4 1.6E4 1.8E4 2.2E4    0. 2.5E4 2.1E4 1.7E4 1.5E4 1.4E4
 583 1.4E4 1.5E4 1.7E4 2.2E4 3.1E4    0. 3.7E4 2.7E4 2.0E4 1.6E4 1.4E4
 582 1.4E4 1.6E4 1.9E4 2.9E4 4.8E4    0. 5.3E4 3.3E4 2.2E4 1.7E4 1.5E4
 581 1.4E4 1.6E4 2.1E4 3.4E4 6.3E4    0. 6.6E4 3.9E4 2.4E4 1.7E4 1.5E4
 580 1.4E4 1.6E4 2.2E4 3.7E4    0.    0. 6.6E4 4.0E4 2.4E4 1.7E4 1.5E4
 579 1.4E4 1.6E4 2.2E4 3.8E4    0.    0. 6.6E4 4.0E4 2.4E4 1.7E4 1.5E4
 578 1.4E4 1.6E4 2.2E4 3.7E4    0.    0. 6.2E4 3.6E4 2.2E4 1.7E4 1.5E4
 577 1.4E4 1.6E4 2.0E4 3.3E4 6.0E4    0. 5.1E4 3.1E4 2.1E4 1.6E4 1.5E4
 576 1.4E4 1.5E4 1.8E4 2.6E4 4.1E4 5.2E4 3.7E4 2.5E4 1.9E4 1.6E4 1.4E4
 575 1.3E4 1.4E4 1.6E4 1.9E4 2.5E4 2.9E4 2.6E4 2.1E4 1.7E4 1.5E4 1.4E4
 574 1.3E4 1.4E4 1.4E4 1.6E4 1.8E4 1.9E4 1.9E4 1.7E4 1.5E4 1.4E4 1.4E4
Anyone know how these high valued pixels get into the file?

These are not the normal case. A histogram of the image portion of the file shows what one would expect. A peak right at the sky background value (about 12k) then dropping smoothly to near zero at about 32K but extending flat from there to 65K. The few ADU=0 points are to few to show up on the graph.

This is right in line with Joe Ronchetti's results. The vast majority of the pixels are in the range between 9000..14000. These are easy to understand the "interesting" ones to me are those in the above table.


Joe Ronchetti jronchetti@earthlink.net
Dec 1, 1996

How do I convert the crval1 and crval2 to dec and ra?


Chris Albertson chrisa@wavenet.com
Dec 1, 1996

For reference here is part of a header:

    CTYPE1  = 'DEC'
    CRPIX1  =                  1.0
    CRVAL1  =               0.0000
    CDELT1  =            0.0038197
    CROTA1  =                  0.0
    CTYPE2  = 'RA'
    CRPIX2  =                  1.0
    CRVAL2  =           344.166659
    CDELT2  =            0.0038197
    CROTA2  =                  0.0

It says,

         (CTYPE1) "along dimension 1 units are DEC"
         (CRPIX1) Reference pixel is pixel #1 (the first)
         (CRVAL1) The reference pixel is looking at DEC=0.0000
         (CDELT1) Each pixel after the reference is looking
                  0.0038197 DEC units farther
The header does not say it, but the units in the DEC direction are decimal degrees.

If you are looking at the files I posted on logicon.com I think the value in CRVAL1 is wrong. I think norman may have fixed this. In real life, Pixel 1 is not looking at 0.0 (the equator) as the header implies, pixel 400 is looking there. Pixel #1 is realy looking at about -1.5 DEC

The header above says the image is above the equator but in reality it is centered on the equator.

Dimension 2 is in the RA direction. Pixel #1 is looking at RA=344.166659 (in decimal degrees) each pixel looks 0.0038197 degrees farther in RA.

The CROTA1/CROTA2 lines say the image is not rotated or skewed.

If you need to convert from RA in degrees to RA in HH:MM:SS it is easy. Just remember that there are 360 degrees or 24 hours in a circle.


Tom Droege droege@fnal.gov
Dec 1, 1996

>But no, I can find very small subsections of the image that contain the
>full 0..65K range.  For example, in 30t0337_269 there are several bright
>stars that are saterated.  These stars come right up from the background
>and then contain a "hole" in the middle.  The hole is a bunch of zero
>ADU
>values in the center of the star.  Typicaly the 65K ADU values are
>directly
>adjacent to the 0 ADU values.  I think it may be caused by the ADC chip
>wrapping when it is fed a voltage it can not handle.  I am not an expert
>on how this process works.
Don't blame the poor ADC, it works very nicely. Blame my electronics. Or better still blame the CCD chip as that is where the problem arises. I will have to think about how to cure this in the next version, but for now you all will have to do it in software. This is of course why we have software instead of doing everything in software. Software is so felxible you know. ;^)

Here is how the problem arises. We clear the charge from the output capicitor in the CCD with the reset pulse. We now sample the voltage on the output capicitor in the CCD and store it in Hold circuit #1. The charge in the next cell is now shifted into the output capicator and we measure its charge and store it in hold circuit #2. An operational amplifier now takes the difference between the voltage on hold circuit #2 and hold circuit #1. This voltage (after amplification) is sent to the ADC. A bias voltage sets the dark difference so that there is about 8000 counts (out of 65000) for dark. This value normally assures that there are no negative differences that the ADC would see as below zero and thus read as zero, losing the value.

When a very bright light shines on the CCD, it does really funny things. The point in time where the reset value is taken becomes full scale. It just does not reset properly. This independant of how hard you drive it or how long, etc.. I think the output circuit is light sensitive. It is worse than that. The reset value can be larger than the light value under these conditions. Too complicated to draw what happens, but I have looked at it many times on a scope. When this happens, the "dark" (sample #1) sample becomes larger than the light (sample #2) and the difference is negative. The ADC properly converts this as zero.

While I can imagine "fixing" this in hardware, it is really a saturated chip problem. I suppose I could sense this and force the ADC to full scale, but probably this is better done in software, what do you all think?? There is always an "edge" problem in hardware which might be hard to cure.

So for now, a zero in the center of full scale readings should be set to full scale. Note that you have already lost calibration when the value goes above about 40,000 counts. 8000 counts is zero. 80,000 electrons divided by 2.5 electrons per ADU gives 32000 counts for the true linear range. Readings above this require bleeding between CCD cells, or charge in a well more that the stated full well capacity. Note that as I understand it, the full well capacity stated on the data sheet is really the "linear full well capacity". Above that value there still may be charge trapped but the voltage generated is no longer a linear function of the light.

I have been less active than usual here because I have been busy with other things. I am now officially "half" retired. I have hired a full time technician to help me at home in this work. The addition to my house is nearly complete, and I have actually swam in the pool. So my new life is starting! I am still trying to get this mail list switched over to Glenn who has agreed to manage it. I just haven't succeeded in attracting the attention of Dave Vrona at wwa.com. No wonder, he is the president of wwa.com and is living the exciting life of being the president of a hot start up. I lived that life once (a company called Applied Logic). We were going to manufacture "computer power" in central stagions much like electric utilitys. You should read the prospectus. By now "time sharing" was gong to be a multi-billion dollar industry. Goes to show you what stock analysts know. Think about Applied Logic when you are tempted to invest in Netscape or ... We had 350 employees at one time.


Jure Skvarc SKVARC@eros.ijs.si
Dec 2, 1996

Thanks to Norman and Chris I see that I was in error when I assumed that those FITS files were "final version" i. e. with dark frame subtracted etc. However, I still think it may be useful to put somewhere in the FITS header information where is the "sky area" in the image.

As for CFITSIO, I don't think it does anything wrong. When it stores pixel values to memory it just checks if everything is OK and short int format I use to read values has range -32768 to 32767. But it is still possible to read data with BITPIX=16 as 32-bit integers or floating point numbers. Of course, you either spend two times more space to store such images or you have to copy data to 16-bit array later. I guess I will probably go for 32 bit integers at expense of doubling memory consumption.


Joe Ronchetti jronchetti@earthlink.net
Dec 2, 1996

I need to know how to come up with accurate dark values to subtract from each pixel.


Glenn Gombert ggombert@mail.erinet.com
Dec 5, 1996

I just downloaded an GREAT Windows95 software package for doing image analysis under Windows95 from the Automated Telescope Facility at the University of IOWA. It has a full featured set of routines for doing such things as SuperNova Searches, looking for new variable stars, and much, much more! Check it out at:

"http://www-astro.physics.uiowa.edu/software.html"

The package takes up 6.5 megabyte file in compressed PKZIP format and takes a LONG time to download so be prepared to wait a while...

The information was supplied courtsey of Dennis diCicco the Senior Editor of CCD Astronomy, they are going to do a review of the package in the next issue of CCDA.


Norman Molhant molhant@ERE.UMontreal.CA
Dec 5, 1996

I have placed a new DOS data acquisition program on the "incoming" ftp directory of "storm.fnal.gov", here are the files to be found there:

 - tm3get11.exe    the DOS executable as compiled by WATCOM C/C++ 10.6
                   (and let me tell you that this compiler is no joy to use)
 - tm3get11.c      the main source file
 - tass_dos.1      the first subsidiary source file, #included in tm3get11.c
 - tass_dos.2      the second subsidiary source file, #included in tm3get11.c
 - tm3get11.htm    the documentation - it has a change history near the
                   beginning, just after the introduction - Please, read it
                   if you want to use tm3get11 or the FITS files it produces.
 - tass_mak.wat    a makefile for WATCOM C/C++
 - tass_lnk.wat    a link file for WATCOM C/C++
 - tass_mak.bor    a makefile for Borland C/C++
 - tass_lnk.bor    a link file for Borland C/C++
 - tass.rc         an *example* configuration file for tm3get11

I'm sorry to say so, but the last version of tm3get10 was bugged - its stack was WATCOM's default size, i.e.: 2 Kb and it overflew whenever closing a set of files after opening the next set, with the usual strange behavior due to a stack overflow... I've since changed the stack allocation to 16 Kb, which is quite enough.

Tm3get11 has a pair of new features: its FITS headers are now clearly commented and there is a way to automatically add your own entries to these headers, for instance to indicate what filter you used on this particular CCD, etc.

Tm3get11 is also more clearly modular, with all its DOS dependencies localized within a pair of files, i.e.: tass_dos.1 and tass_dos.2 (what else?). I've been quite ill, hence my productivity has been low, which may or may not explain both the bug I left in the last tm3get10 and the delay in delivering a Linux version of tm3get11. Rest assured that I'm working on it with all of (what's left of) my energies. And yes, it will be the same tm3get11 that you now see running under DOS, but running (much more smoothly, I hope) under that much better of OS'es: Linux.

I'm too tired to keep working tonight, so bye for now!


Norman Molhant molhant@ERE.UMontreal.CA
Dec 6, 1996

Nick asked some good questions whose answers might interest some more of us. So, here are my answers: Dear Nick, you asked:

> I am setting linux up on the second drive of the tass data collection 
> computer. I was planning to use redhat linux. What version kernel are you 
> running, and are you using the new release of the XFree86 (I think it is 
> 3.2)?
I am not too sure for the Linux kernel: I'm running DOS on the same machine right now and can't check without loosing my telecom access. I think it is kernel 1.3.0 or some such number between 1.3.0 and 1.3.21 (I'm sure it is less than 1.3.21). XFree86: I am using release 3.2, 'coz previous releases didn't work with my ATI Graphics Expression video card.
> Can you let me know when you might be ready for someone to alpha test 
> your code? I would like to look it over to see how it might integrate 
> into the remote control approach we are setting up at the lab.
I'll tell everybody on the list as soon as it stops freezing & crashing my Linux box, promised! But you might prefer to tell me how you intend to go about providing access to both the FITS data files (not in real-time, but maybe nearly so, as one is produced every few minutes by each camera in a TASS triplet) and the real-time display (further info on that further down in this message).
>                                                               (I want to 
> collect the rough image into a periodically updated graphics file, and 
> send it to a heavy duty httpd server that will be accessable to the 
> outside world. (We are setting up the apl observatory home page to have 
> outside access). The observatory had two relatively low power computers 
> (486) one collecting data, the other managing a limited use homepage. The 
> home page server can run a script to convert a tass collected rough image 
> (4 bit pixel) into a gif or jpeg file, and then send it to the sparc 20 
> that the lab uses to manage its outside web pages. I need to see how your 
> program sets up the image display so I can taylor the web server routines.
Well, what tm3get11 does is this: as soon as it receives a completed (800 pixels) line from the TASS device driver, it copies it to the currently open FITS file (or files when in the overlap area between two successive files). Then it computes a one-dimensional histogram of the image pixels in that line, in order to find its median, which it then divides by 16, discarding 4 LS bits. Then it similarly discards the 4 least significand bits from all image pixels to get 12-bits pixel values, substracts the above calculated median (replacing negative results with 0) and replaces all results above 255 with 255, thus getting 8-bits pixel values. It then uses a look-up table (with 256 entries) to find the 4-bits approximate log of these pixel values and uses these logs to update the display. So, in order to satisfy your desire to make a fast display available for downloading, I may copy any of the following data to a Linux named pipe (or some similar device - I think streamio might also be appropriate - I'm open to suggestions here) for use by your programs:

I think the first one is redundant as new FITS files become available every few minutes. The second one is not too useful, I think. The third one is half the size of the raw data and might be nice for gif or jpeg files (I don't recommend the latter: it's a slow compression method and I have seen it generate a lot of artifacts on stellar fields - you might instead consider using the new "free" image file standard that is currently taking the WEB by storm, it compresses well and doesn't produce the obnoxious artifacts that plague jpeg). The last one is already four times smaller than the raw data, with two pixels per byte. Even for this format I would recommend avoiding jpeg, though.

So, what do you want tm3get11 to do for you?


Nick Beser beser@aplcomm.jhuapl.edu
Dec 6, 1996

Norman,

I agree with your suggestion about JPEG. If you save 4 bit logs (what you see on the screen), that may be sufficient for determining if everything is working OK. (I can live with 8 bit or 4 bit). I like the idea of limiting the file size at the data collection machine. Since I have a second computer that is maintaining the home page, it will retrieve the latest file from the data collection machine. I would like to keep it as low overhead as possible.

One idea (just for discussion). If you are creating the 4 bit per pixel, 2 pixel per byte output from the data collection machine, you can output that to a sockets interface that will send it via the lan to the data collection computer. The matching routine will collect the data stream and output a series of gif files and home page command signals (either by semaphore files or by mail box). The home page will use the latest display file in its update to the user monitoring the system. The output pipe could have as a format:

  time stamp, 
  line number, 
  temperature 1, 
  temperature 2, 
  4-bit encoded pixels 
  (newline)

The receiver program will take the pixel data, add it with previously collected data, and when 10 or 20 seconds goes by, convert it to GIF, output the file, and then take the time stamp, line number, temperature 1 and 2 and output that to a text file. The home page will have a task that is monitoring for the new text file, read it, output the data, and direct the GIF to the user currently logged into the home page (refreshing the screen automatically).

This way, the home page will have access to the temperature values, able to detect problems, issue shut down to 12 volts power supply if necessary, send out emergency e-mail, without interfering with the data collection. If it becomes overloaded, it just will have a data dropout.


Nick Beser beser@aplcomm.jhuapl.edu
Dec 6, 1996

Chris Albertson wrote:

> Well, I said a conversion program would be easy to write...
> 
> Should anyone want to periodically scan a directory for new *.fts files,
> convert those files to *.gif files then move both the gif and fts files
> to new directories, the following will do that for you.  It should run
> on any UNIX or Linux system.  Most systems will already have the
> required
> utilities installed.  If not they are easy to get off the 'net.
> 
Most if not all of the utilities are standard with linux (redhad edition and slackware are my two data points). I planned to do something simpler. Since the raw pixels are available (downloaded from the data aquisition system as 4 bit per pixel data, I can use a library to create a GIF file. I think we are talking a few seconds (I will have to rig a set of test data to develop and check the routine. I would like the data aquisition computer to spend all of its time doing the data collection, and leave the re-format to the home page server.


Nick Beser beser@aplcomm.jhuapl.edu
Dec 6, 1996

Chris Albertson wrote:

> I'd also extend this Idea to the UNIX real-time display.  Make
> it a seperate non-real-time program.  It would accept pixels from
> tm3get11 scale and display them on an X11 screen  The display program
> should be the one to scale the pixels to the properties of the display
> device and the user's preference.  This removes any X11 display overhead
> from your real-time program.  
> 
> If you have not yet written the UNIX display code, perhaps you could 
> skip it and simply blast the pixels out a named pipe or socket.  This
> would be much easyer to do then any calls to actualy draw thoses pixels.
> 
> Now you need another program that reads from a socket or named pipe and
> does whatever it wants with those pixels, converts them to low-res GIF,
> or writes them to an X-display, or does some kind of real-time comet or
> supernova hunting or whatever...  In any case I think the pixel scaling
> should be done by the end that reads the pipe.  BTW I would have made
> the
> FITS file writer just another one of those pipe readers too.
> 
> ....
> 
> Then a GIF writer would look a lot like a FITS writer: they both just
> read from a pipe and write to disk.  An SVGA displayer would look like
> and X11 displayer, they both just read from a pipe and write to thier
> display.  With sockets, any of these "readers" could run on any
> computer on the network that understands sockets, even Win95, Sun,
> or Linux.
> 
> Another advantage.  When the Mk IV comes out you only have to redo the
> part that reads from the camera and stuffs pixels into the pipe.

Chris,

This all makes sense. If we are piping the 4 bit pixels to a socket interface, then the slow data aquisition computer can just pipe the data to the faster X windows display system. If you are displaying it via a slow modem link on that fast X-11 host, then the speed differential will not effect (or should not effect) the slower data aquisition computer. It would fit in nicely with the httpd approach of providing netscape access to the latest GIF image from the telescope.

We will see if nfs access to the fits files has any effect on data aquisition.

Since we do not have a high speed computer taking the data, I was not planning on making the FITS files available until after the observing session. That also depends on the APL network management people allowing us storage for off-site ftp access. (We think that will happen, but they will not give their blessing until they see the whole system).


Norman Molhant molhant@ERE.UMontreal.CA
Dec 6, 1996

Said Chris, replying to Nick about the use of separate programs to transform FITS files (or 4-bits display files) into downloadable GIF files:

> I'd also extend this Idea to the UNIX real-time display.  Make
> it a seperate non-real-time program.  It would accept pixels from
> tm3get11 scale and display them on an X11 screen  The display program
> should be the one to scale the pixels to the properties of the display
> device and the user's preference.  This removes any X11 display overhead
> from your real-time program.  
Well, yes and no... I'll have to explain the architecture of the Linux implementation of tm3get11 so we can start talking about one and the same thing, I guess. See further down in this message.
> If you have not yet written the UNIX display code, perhaps you could 
> skip it and simply blast the pixels out a named pipe or socket.  This
> would be much easyer to do then any calls to actualy draw thoses pixels.
Well, possibly, but I'm not too sure. The DOS version of tm3get11 already contains a lot of display code (now neatly separated into a pair of DOS-only included files: tass_dos.1 and tass_dos.2), so writing the corresponding interface for X11 would not be that much trouble - the interface is pretty clean, anyway, and there is a subset of X11 that's fairly easy to handle too (with fixed-size windows without mousy interface and similar restrictions).
> Now you need another program that reads from a socket or named pipe and
> does whatever it wants with those pixels, converts them to low-res GIF,
> or writes them to an X-display, or does some kind of real-time comet or
> supernova hunting or whatever...  In any case I think the pixel scaling
> should be done by the end that reads the pipe.  BTW I would have made
> the FITS file writer just another one of those pipe readers too.
Well, I see we really need to share an identical view of tm3get11-under-Linux, so here goes its architecture:
> Well, here I am telling you what to do when you are doing all the work.
> But if the program where not monolithic some of us could contribute a
> "pipe reader" or two and all you'd have to do is read data from the
> hardware and stuff the pipe.  
As you can see, it is not that monolithic... ;^) If there is something to be gained by separating the X11 real-time display code (which I'm not sure there is), I could do that, and if someone out there is interested in doing that part, I would readily accept such help (but I get to specify the interface data format - and I am known to be a buff of packetizing, so be warned: it would look like packetized message passing via a named pipe or whatever similar stuff is available under Linux).

Much more interesting would be to separate a possible remote access facility from the bulk of tm3get11, i.e.: some separate program that would accept remote requests, translate them into pseudo keypresses & insert them within the stream on keypresses coming from the real keyboard to tm3get11 (on one side) and send the 4-bits image lines and textual data for real-time display to both the X11 driver and the appropriate remote display facility...

Such a program would relieve tm3get11 from all its user interaction parts and thus considerably simplify its code. I have written a similar program a few years ago, when XENIX was all the Unix that PC owners could (quite expensively) enjoy... 't was fun writing, but then there was no image display facility, no X11 to interface to, etc... Much easier than this job! Although the remote control facilities were PC's running a special TSR program under DOS that disguised them as VT100 terminals for XENIX purposes while letting them run whatever program their owners wanted (for DOS purposes), and that TSR was indeed quite a challenge to write. ;^)

> Then a GIF writer would look a lot like a FITS writer: they both just
> read from a pipe and write to disk.  An SVGA displayer would look like
> and X11 displayer, they both just read from a pipe and write to thier
> display.  With sockets, any of these "readers" could run on any
> computer on the network that understands sockets, even Win95, Sun,
> or Linux.
And tm3get11 becomes a TASS server program. As I wrote above, I would prefer to cut neatly all user interactions from such a server and place them in a separate program (that would process both remote operations and X11/SVGAlib displaying and local keyboard input, exchanging only messages and data with the tm3get11 server) - any takers for such a "user interactions" program? And by the way, it would have to be able to run on a networkless Linux station, which means that (maybe regrettably) sockets would not do it (unless you know something I don't - a distinct probability, that!).
> Another advantage.  When the Mk IV comes out you only have to redo the
> part that reads from the camera and stuffs pixels into the pipe.
No advantage on the current architecture, that: I just have to redo the part that poll the Control Card and maybe change 10 to 20 % of the device driver code to become Mark IV ready... ;^)


Chris Albertson chrisa@wavenet.com
Dec 6, 1996

Thanks a lot for the explaination of Linux tm3get. rather then quote you I'll try to explain your design in my own words. See if I am correct. I'll try to explain it for non-UNIX types as this is going over the TASS mail list too.

Question for the reast of the group: Would the ability to easyly write "clients" as discussed below be a valueable feature?

So here goes a further refinment of my version of a Linux TASS system:

First by some magic of kernel hacking and device driver writing by Norman we will have a "special file" called "/dev/tassmk3" Now by the above magic this file is connected to the TASS camera hardware and a normal user program can open and read from it as if it were a normal file on a disk. (Close enough) Now when you read from the "special file" you get 3x800=2400 raw pixels of data at a time. This special file is esentualy an extension of the Linux OS.

Now here is where my design would differ sightly from Norman's plan. (It may seem like a large departure at first but at the end of this message I argue that it is not.) Instead of having tm3get11 directly read from the special file /dev/tassmk3, I'd write a "pixel server". A pixel server would read from /dev/tassmk3 and then supply those pixels to any number of clients via a socket interface. The pixel server would act as a "Y" or even an octopus supplying pixels to any number of "users" These users or "pixel clients" would read raw pixel data from thier socket and do whatever they whished with the data. I can see that there could be several usfull clients: