The Electronic Computer as an Astronomical

advertisement
T h e E l e c t r o n i c C o m p u t e r as an A s t r o n o m i c a l I n s t r u m e n t
MARSHAL H .
WRUBEL
Indiana University, Bloomington, Indiana, U.S.A.
SUMMARY
The enormous potential of the electronic computer as an instrument of observational and theoretical
research is emphasized. Astronomical examples are used to illustrate the concept of programming
and the flexibility of electronic computers. Specific recommendations are made for the effective use
of these devices in astronomy.
1. INTRODUCTION
THERE are v e r y few a s t r o n o m e r s f o r t u n a t e e n o u g h to w o r k w i t h p a p e r a n d pencil
alone. F o r m o s t of us, t h e r e is a long p a t h to be followed, f r o m o b s e r v a t i o n s to conclusions, or f r o m t h e o r y to prediction, before our w o r k can be useful to ourselves
a n d others. I n some cases the d a t a o b t a i n e d in one night of o b s e r v a t i o n s m a y t a k e
weeks to analyse. This process m a y be so t i m e - c o n s u m i n g t h a t f r e q u e n t l y o n l y a
f r a c t i o n of t h e d a t a are r e d u c e d before t h e a s t r o n o m e r is d i v e r t e d b y new p r o b l e m s .
As a result m u c h useful i n f o r m a t i o n g a t h e r s d u s t a n d n e v e r a p p e a r s in t h e literature.
W h a t c a n be m o r e d e t r i m e n t a l to a s t r o n o m i c a l e n t h u s i a s m t h a n routine, dull,
laborious c o m p u t a t i o n ! I t has s t r a n g l e d some large p r o g r a m m e s , it has d e l a y e d others
a n d it f r e q u e n t l y drives p r o m i s i n g g r a d u a t e s t u d e n t s c o m p l e t e l y a w a y f r o m astron o m y . Unless a large force of desk calculator o p e r a t o r s is available (and this is unlikely w h e n a s t r o n o m e r s m u s t hire assistants in c o m p e t i t i o n w i t h i n d u s t r y ) , t h e
a s t r o n o m e r m u s t do t h e w o r k himself a n d s p e n d v a l u a b l e hours at m e n i a l tasks,
i n s t e a d of in creative t h o u g h t .
W i t h this obstacle in the p a t h , one would t h i n k t h a t a s t r o n o m e r s would leap a t t h e
p r o s p e c t of using high-speed c o m p u t e r s . This has n o t been t h e ease. ( A s t r o n o m e r s
are i n n a t e l y as c o n s e r v a t i v e a g r o u p of scientists as one can find.) W i t h the exception of a few widely dissimilar fields the use of c o m p u t e r s has been t i m i d a n d sporadic.
B y a n d large, the principal reason has been inertia. A s t r o n o m e r s are v a g u e l y a w a r e
of w h a t electronic c o m p u t e r s can do to help t h e m , b u t few h a v e t a k e n the t r o u b l e
to i n v e s t i g a t e further. F o r some reason, electronic m a c h i n e s are r e g a r d e d either as
m y s t e r i o u s or difficult to learn to use. I n reality, w i t h a little guidance, a n y o n e
f a m i l i a r w i t h desk calculators can be p r o d u c i n g useful results w i t h a high-speed
m a c h i n e in a m a t t e r of six weeks or less. While this m a y a p p e a r to be a long t i m e to
d e v o t e to learning a new technique, it is an i n v e s t m e n t which saves far m o r e t i m e
in the end.
N a t u r a l l y , a s t r o n o m e r s c a n n o t be e x p e c t e d to change t h e i r m e t h o d s o v e r n i g h t .
I t will be t h e y o u n g a s t r o n o m e r , a c c u s t o m e d to learning new things, who will a c c e p t
electronic c o m p u t a t i o n in his stride. I t is to these men, especially, t h a t this article is
addressed.
107
108
The ele<~tronic computer as an astronomical instrument
2. SIMPLE EXAMPLES OF COMPUTER TECHNIQUES
Before discussing specific astronomical applications, let us examine the electronic
computer in more detail. I t has five principal parts : the input, into which information
if fed ; the output, out of which results eventually come ; the memory, where information is retained for use during the computation; the arithmetic unit, in which the
calculation is performed ; and the control unit, which supervises the entire operation.
Each machine has a basic vocabulary of instructions which it is able to perform.
These are the "words" of the "machine language". By assembling these instructions
in the proper sequence, a series of operations can be performed on the data to solve
a specific problem. This sequence is called the "program m e" and the process of
constructing it is called "programming". The instructions of the programme must
be written in a (usually numerical) code t hat the machine can understand. This
process is called "coding".
Once the correct sequence has been constructed for a particular problem, it can
be used again and again on different data. For example, once a programme for
reducing photoelectric observations has been written and coded for a particular type
of computer, it can be used without further programming, to reduce as much data
as desired. I t can also be used on any similar machine anywhere in the world.
In practice, the entire programme is stored in the memory. Once the execution of
the programme is begun it continues automatically. After the calculation has been
completed for one set of data, the results are punched or printed, and new data are
automatically fed in.
The programme l i b r a r y is one of the most important features of any computer
installation. Programmes of general interest have been developed for all the standard
machines and m a n y of them have astronomical applications. For example, leastsquares curve fitting programmes are available, and to use them it is only necessary
to punch the data on cards or tape in the proper form. Standard procedures of interpolation, quadrature, and m a ny statistical operations are already available and can
be used by astronomers with very little additional work.
Purely astronomical applications, however, will have to be programmed by the
astronomers themselves. I f t hey wait for someone else to do it, it will never be done.
Fortunately, m a n y techniques are being developed to make programming as
simple as possible. The tendency is toward making the machine do most of the work.
While the professional programmer regards these short-cuts with some disdain, the
beginner would do well to learn them. Although programmes written by these
methods may not make the most efficient use of the machine, t hey lead to workable
error-free programmes in a much shorter time.
One such approach is called "automatic programming" and a typical example is
F O R T R A N , developed by IBM for its Type 704 computer. F O R T R A N is very
attractive to the scientists because programming is done in a language very similar
to algebra. For example,
Y = (A**2) + (B**2)
- (2.*A*B*COSF (THETA))
is the F O R T R A N equivalent of evaluating :
y = a 2 + b2
-
-
2ab
cos 0
MARSHAL H. WRUBEL
109
A single asterisk indicates multiplication, a double asterisk is e x p o n e n t a t i o n , and
COSF indicates t h a t the cosine f u n c t i o n of the a r g u m e n t T H E T A is desired.
W h e n F O R T R A N is used, the entire p r o g r a m m e is w r i t t e n in F O R T R A N language and fed into the machine. T h e c o m p u t e r itself t h e n decides how to express
the F O R T R A N p r o g r a m m e in its own basic code a n d produces a deck of cards
which can be used in the f u t u r e to r u n the problem with a p p r o p r i a t e data.
" I n t e r p r e t i v e s y s t e m s " are also widely used. H e r e we substitute a simpler and
more versatile language for the one built into the machine, and h a v e the machine
" t r a n s l a t e " each instruction i m m e d i a t e l y before executing it. A typical i n t e r p r e t i v e
code is the one developed at Bell Telephone Laboratories for the I B M T y p e 650.1
The example, given above, now is expressed b y the following series of instructions:
3
20I
20I
3
0
3
3
1
2
202
304
603
604
601
606
202
203
201
202
602
603
601
602
603
6O4
605
606
607
This appears to have little relation to the formula it is i n t e n d e d to represent, b u t we
will soon see t h a t it is entirely logical. (Although not p r o g r a m m e d as efficiently as
possible, this will serve as a suitable example.)
E a c h line represents one instruction and each instruction consists of l0 digits:
first one digit, t h e n three groups of three. To u n d e r s t a n d this p r o g r a m m e it is
necessary to k n o w a little a b o u t the m e m o r y unit used b y this system. I t consists of
one t h o u s a n d locations, with "addresses" 000 to 999. I n each location one 10-digit
word can be stored.
I n f o r m a t i o n can be sent to or from a n y location b y specifying its address at an
a p p r o p r i a t e place in an instruction. W h e n new i n f o r m a t i o n is sent to a p a r t i c u l a r
location the old i n f o r m a t i o n is a u t o m a t i c a l l y erased; b u t i n f o r m a t i o n can be called
for from a n y location w i t h o u t affecting the i n f o r m a t i o n stored there. T h a t is, when
we send i n f o r m a t i o n to location 601, the n u m b e r previously in 601 is lost; b u t when
we call for i n f o r m a t i o n from 601, the n u m b e r in 601 remains there. P r i o r to executing
the instructions given above, we will assume t h a t a, b, and ~ h a v e been stored in
locations 201, 202 and 203 respectively.
The first instruction reads
3
201
201
601
The first digit, 3, indicates t h a t a multiplication is to be performed. The multiplier
is in 201, the multiplicand is also in 20I, and the p r o d u c t is to be stored in 601.
The instruction, therefore, c o m p u t e s a 2 and stores the result in 601.
I n a similar way, the second i n s t r u c t i o n computes b2.
The i n t e r p r e t a t i o n of the t h i r d i n s t r u c t i o n is s o m e w h a t different. Since the first
digit is zero, it indicates t h a t the first group of three digits is not an address, the
w a y it was in the previous instructior_.% b u t instead is an instruction code. I n this
case, 304 indicates t h a t the cosine of the n u m b e r in location 203 is to be t a k e n a n d
1 IBM Technical Newsletter No. 11.
110
The electronic computer
as an astronomical
instruInent
stored in 603. This is multiplied by a in the next instruction and stored in 604; and
by b in the next and stored in 605.
Finally, once we know t h a t the code " 1 " is addition, and " 2 " is subtraction, the
last instructions should be easily understood. The final result can be found in location 607.
B y way of contrast, consider the programme for the same calculation using a
system called SOAP on the IBM T ype 650:
BEGIN
RAU
MPY
STU
RAU
MPY
STU
RAU
LDD
MPY
RAU
MPY
STU
RAU
AUP
SUP
STU
A
A
ASQ
B
B
BSQ
THETA
COS
A
8003
B
TEMP
ASQ
BSQ
TEMP
Y
END
Note how much more has to be written in comparison with either F O R T R A N or
the Bell interpretive system. This is a very flexible programming procedure, but it
is also somewhat complicated.
W ith o u t going into much detail, a few things can be pointed out. E v e r y instruction begins with a three-letter mnemonic code. Memory locations are also given
symbolic codes. The first three instructions calculate and store a 2. RAU means
Reset Add Upper accumulator (part of the arithmetic unit). The effect is to clear
the arithmetic unit and set up the multiplier, a. The second instruction carries out
multiplication by a; the third instruction, STU, means STore Upper accummulator,
and it stores the product in the symbolic location ASQ. To explain the rest of this
programme is beyond the scope of this article.
Brief though our description has been, it should at least indicate t hat using a
technique such as F O R T R A N , or the Bell Laboratories interpretive code, is not
beyond the capabilities of any astronomer.
3. T H E R O U T I N E USE OF COMPUTERS
Suppose we have become reasonably proficient programmers; what then? To
what sort of problems could this technique be applied? To begin with one could
automatize all the standard computations t h a t are being done at an observatory:
radial velocities, photoelectric reductions, least squares solutions, plate reductions,
radio telescope reductions, statistical analyses, etc.
The process begins by making a broad outline of the computation in the form of a
"flow diagram". The entire computation is divided into " b o x e s " ; each box represents a separate phase of the problem, frequently complete within itself. The boxes
MARSHAL H. WRUBEL
111
are linked b y flow lines which indicate the path the computation should follow. The
machine can be instructed to choose between alternate paths; for example, different
procedures m a y be needed depending upon the sign of a result, or perhaps a particular function is best represented b y one expansion for large values of the argument
and another for small values. The computer can be programmed to make decisions
of this kind.
The problem is usually programmed one box at a time. Each large box m a y be
further subdivided into smaller boxes, depending upon its complexity. B y using a
flow diagram, the programming can be done in an orderly w a y and the interrelation
of all the parts is clearly visible. In explaining a problem to someone else, either an
astronomer or a computer expert, it is much easier to talk in terms of the flow
diagram than in terms of the programme. The programme is cluttered with details
of little interest to anyone but the programmer, but a properly prepared flow diagram gives the essence of the calculation.
v
Fro. 1. Definitions for line profile computation.
Consider the following example from the theory of absorption lines. Suppose we
want to find the profiles of lines formed b y scattering according to the SCHUSTERSCHWARZSCHILDmodel. The parameters of the problem are:
(1) the abundance factor, r0;
(2) the limb darkening, I(O)/I(1); and
(3) the damping, a.
The line profile is built up point b y point using the variable, v, to measure the distance
from the centre of the line. The object of the calculation is to compute R(v), the
residual intensity at the point, v, in units of the continuum (Fig. 1).
CHANDRASEKHAR2 has given the solution for R(v), and is has been written for
purposes of computation3 as
R-
.~+ K y
:~+Tl+2y
where y is tabulated as a function of e -~1, and
K=
4
3I(O)/I(1)+ 2
depends only on the limb darkening.
C~A~DRASEKH.~, S., and ELBERT, DONNA in Ap. J., 115, 26-9, 1952.
a WRUBEL, M. H. in Ap. J., 119, 51, 1954.
1 12
The electronic c o m p u t e r as an astronomical i n s t r u m e n t
The q u a n t i t y ~1 depends u p o n a, v, and ¢0, a n d can be f o u n d from the t h e o r y of
the absorption coefficient. I t is given b y the relation
~'] (a, v) = ~'0H(a, v).
HARRIS4 has t a b u l a t e d the functions H~(v), necessary to evaluate
4
H(a, v) = ~_~ aiHl(v).
i=o
W e h a v e given above e v e r y t h i n g necessary to c o m p u t e profiles, b u t we have not
p u t things in a logical order for c o m p u t a t i o n . Obviously y m u s t be k n o w n before we
can find R, and rl m u s t be k n o w n before we can find y.
The flow diagram of Fig. 2 indicates the order in which the calculations must be
carried out to c o m p u t e a line profile automatically. The t e r m " R e a d " means t h a t
I 1.
Read a ]
12.
Read I(')]I(1)]
3.
7~4.
;
Read % ]
Read v, Hi(v) (i = 0 . . . . . 4)
l
5.
16.
Compute 71 :
To ~ aiHi(v)
Iz0
l
Compute e-rl I
l
17
[8.
Coml)ute R(~) ]
19.
P u n c h a, I(°)/I(1), "to, v, R(v) ]
Interpolate in table to find y I
l
l
I
Fio. 2. Flow d i a g r a m for SCHUSTER-ScH'vVARZSCHILDmodel line profiles.
a card enters the input, and the i n f o r m a t i o n p u n c h e d on the card is stored in the
m e m o r y unit. (In box 4 the values of v and H0 to H4 are all on one card.) " P u n c h "
means the results, and some identifying i n f o r m a t i o n are p u n c h e d on a card b y the
o u t p u t unit.
After the result has been calculated and p u n c h e d for one value of v, the machine
a u t o m a t i c a l l y reads the n e x t value. This process continues until the last value of v
is read. I t is t h e n possible to read new values of a, I(O)/I(1), or ~0, if desired.
As a n o t h e r example, consider the reduction of photoelectric observations. One
procedure has been p r o g r a m m e d for the I B M 650 b y EDWARD C. OLSON for the
National Astronomical Observatory, following a m e t h o d due to HAROLD L. JOHNSON.
In order to reduce observations to the U, B, V, system, it is necessary to obtain
4 HARRIS, D. L., I I I ; in A p . J., 108, 112, 1948.
MARSHAL H. WRUBEL
113
the extinction of the atmosphere and the transformation of the instrumental colour
system to the standard system.
For example, assume t h a t the B-V colour is related to the instrumental yellow
colour outside the atmosphere, Cy, by the linear transformation:
B - V = A1T A2Cy.
Cy is found from the raw colour, Cyo, by using an extinction coefficient to remove the
effect of the atmosphere:
Cy=
Cy0 -/cl sec z
1 + 0.032 sec z
In turn, the raw colour is found from the yellow and blue deflections, y1 and B 1,
together with the amplifier-gain step-calibrations, S r and SB :
Cyo = 2.5 log (Y1/B1) : SB -- S t .
I f four or more standard stars of known B-V are observed, the values of A1, Au and
kl, can be found by least squares. This will involve setting up three linear normal
equations which are solved simultaneously by standard procedures. The flow diagram is given in Fig. 3.
1. Read Coordinates and colors of standard stars 1
12. Read Amplifier gain step calibrations I
3. Read :Hour angle and deflections for standardstars observed I
14. Compute see z I
15. Compute raw yellow color ]
I 6. Compute coefficients of linear system I
] 7. Compute solution of linear system ]
I 8. Punch A1, A~ and kl ]
Fic,. 3. Flow diagram for obtaining B-V transformation and extinction factors.
A similar procedure is used to obtain the constants needed to go from ultra and
yellow deflections to U - B and V. The individual formulae are somewhat different,
but eventually the problem reduces to the solution of a system of simultaneous
linear equations. This suggests t h a t we can use the same programme for solving each
linear system. Box 7 can therefore be removed from the general flow of the problem
and treated separately, as a "subroutine". Whenever we need to solve a linear
system, we execute the subroutine. When the solution is found, the normal flow of
the computation is resumed.
A flow diagram for computing the three groups of transformation coefficients is
given in Fig. 4.
114
The electronic computer as an astronomical instrument
The main flow is interrupted three times to execute the same subroutine each
time, of course, with different data.
I do not mean to minimize the steps that lie between the flow diagram and the
final programme, but the flow diagram is half the battle. With the aid of a flow
diagram, the astronomer should be able to describe his computation to the programmer. If the astronomer knows programming as well, the battle is won.
1. Read
data (as above)]
2, Compute
see z I
3. Compute
raw yellow color ]
4. Compute
coefficients of linear system [
[ enter subroutine t
[ leave subroutine ]
5. Punch
transformation coefficients for B-V ]
6. Compute
raw ultra color ]
7. Compute
coefficients of linear system ]
] enter subroutine I
I leave subroutine]
( 8. l)unch
[ 9. Compute
10. Compute
transforlnation coefficients for U-B~
raw yellow magnitude ]
coefficients of linear system ]
I enter subroutine ]
I leave subroutine I
il.
Punch
transformation coefficients for V [
~IG, 4.
4. T H E ]'MAGINATIVE U S E OF COMPUTERS
If electronic computers did nothing but the routine reductions associated with an
observatory, they would be very useful. But their potential is far greater than that.
As one becomes more familiar with computers, they illuminate new ways of approaching old problems; and, which is certainly more important, they bring observational
MARSHAL H. WRUBEL
115
and theoretical problems that were at one time beyond our reach into the realm of
possibility. F o r example, sequences of stellar models describing tracks of evolution
in the H - R diagram require such an enormous amount of computation that highspeed machines are absolutely necessary to calculate them in a reasonable time.
To show how a simple problem can grow in generality when an electronic computer is available, consider the flow diagram of Fig. 2 again. This was a scheme for
calculating line profiles according to the Schuster-Sehwarzschild model. I f we
examine it closely, however, we see that it can be described in more general terms
(Fig. 5).
]
Read parameters
(Boxes l, 2 and 3)]
$
Use theorY(BoxesOf
absorption4
and 5)c°efficient ]/
Use solution of transfer equation /
(Boxes 6, 7 and 8)
___ !
Punch results
(Box 9)
FIG. 5.
In our original application we used the results of the solution of the transfer
problem for the SCHUSTER-SCHWARZSCHILDmodel in boxes 6, 7 and 8. We could easily
substitute the solution for the MILNE-EDDINGTON model, keeping the programme for
boxes 1 to 5 and box 9 intact; or we could substitute any other assumed relation
between the residual intensity and the parameters.
We could further change boxes 4 and 5 if some other theory of the absorption
coefficient were preferable--say, in considering the Stark broadening of hydrogen
lines. In this w a y we may "ring the changes" on an existing programme, preserving
or replacing sections as the situation demands.
Actually, electronic computers make it feasible to go beyond idealized models in
which the parameters are constant with depth, to compute line profiles for model
atmospheres in which ionization, damping, etc., vary with depth. Although this is
possible with desk calculators as well by using weight functions or similar techniques,
the ease with which these computations can be carried out on an electronic machine
makes it reasonable to explore a much wider range of possibilities. For example, it
would be possible to perform numerical experiments on the effect of blending or
blanketing.
This flexibility of programmes is not restricted to theoretical problems. In the
example we discussed concerning the reduction of observations of standard stars to
obtain extinction and colour system transformations, we assumed a linear relation
between the instrumental and B - V colours. This assumes the systems are not very
different; b u t if they were, the machine could be programmed to include non-linear
terms as well.
Astronomers have scarcely begun to explore the possibilities of existing computing
equipment, b u t we might mention some of the advances that probably lie ahead.
116
T h e electronic c o m p u t e r as a n a s t r o n o m i c a l i n s t r u m e n t
One particularly promising application of computer techniques is in selecting, from
a large memory, information which fits particular requirements. I f a suitable device
is perfected to transcribe a printed page directly to magnetic tape, it would become
practical to record volumes of information, such as the Henry Draper Catalogue, in a
form machines can easily use. This could simplify the planning of observing programmes, because it would then be possible to ask the machine to "find the co-ordinates of all A stars brighter than 10th magnitude t h a t can be observed from McDonald
Observatory in March".
Going one step further, it may one day be possible to search the literature by
machine to find all references to a particular object. And, of course, there is the
possibility of translation by machine, an E1 Dorado so m a n y are seeking, and which
will be of profit to the astronomer as well as every other scientist when found.
5. C O N C L U S I O N S A N D R E C O M M E N D A T I O N S
Few observatories have enough routine reductions to keep a high-speed machine
busy, even for an 8-hour day. Therefore, if they do not have a theoretical department
interested in machine computations they cannot justify the rental or purchase of a
large calculator. Observatories connected with universities may be fortunate in
having a computer facility accessible on the campus which they can share with
other departments. In other cases, nearby industrial installations may be generous
in offering computing time in the wee hours of the morning. (This should not disturb
an astronomer.)
The success of the connection between an observatory and an electronic computer will largely depend upon the accessibility of the machine. I t must be near
enough so t h a t it can be used without spending a disproportionate amount of time
getting to it. It ought to be a machine for which a large programme library of standard methods is already available. (This is the case for most of the widely distributed
machines and also for a few "one of a kind" machines at active research installations.)
The observatory should hire a part-time programmer who would be responsible for
co-ordinating the observatory's use of the machine. He would also have the responsibility of running the programmes on the machine.
Finally, at least one astronomer on the observatory staff should acquire, through
experience, a knowledge of machine techniques. Otherwise, the connection between
the observatory and the computer will be too remote to be effective.
The electronic computer is an important research tool. Now it is up to the astronomer to use it.
Download