[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some Code to Look At



A slightly more ambitious project would be to pass more arguments and write 
out a .fts file.  This solves the problem of getting the format right so 
that it can be read by RawToFits.

There are a couple of ways to do this.  I could have the QBasic program 
write a file every time one starts a run with all the interesting stuff in 
it.  Then the code would be as stated.

SHELL program, Vfilename, IFilename

The program could then go to the file and get everything needed to write a 
.fts file.  The file could, for example, contain the shutter opening and 
closing times.

In fact, this would solve almost everything.  I could still write and test 
with the present QBasic code.  This would allow ease of debugging and 
testing here.  I would always be able to say "you can test this problem by 
..." as I can now.  See the #3 trouble shooding note for an example of what 
I can do now.

This breaks the code problem into two pieces.  One is my kludgy QBasic code 
that runs slow, but does not have to run fast.  The other is the elegant, 
fast .fts file writer that unloads the memory and writes proper .fts 
files.  All I have to do is to add statements to my code like:
OPEN "file" FOR APPEND AS #5
PRINT #5, "VSHUTTEROPENTIME = 12376.3"
CLOSE #5
This would append

VSHUTTEROPENTIME = 12376.3

to the end of "file".  The fits writing program could look for the last 
occurance of VSHUTTEROPENTIME = 12376.3
to get that item.  Or better for clean up, I could just write one file for 
the rarely changing things and another fixed file for things like the 
shutter time.

I am hot to do this since I see it as a way to run in the intermediate term 
until we get the full blown operating program done.

What does everyone think?  OK, wake up, the superbowl is over.

Tom Droege


At 04:51 PM 1/28/01 -0600, you wrote:
>OK, Andrew Bennett has demonstrated that better code can be written.  How 
>about someone doing it?  I propose substituting: