This is the help file for 

-----------------------------------
Coordinate Conversions in Astronomy
     ver 1.01 by R.T.F.Rekola
 Tuorla Observatory - FEB/MAR 1998
-----------------------------------
 with version 2.3 conversion engine 
   from the WWW version; AUG 2003.
===================================

or CooC as the program is called.

N.B.	All users are kindly asked to inform the author of all errors and 
====	other annoying features of the program or of anything in this help 
	file that does not seem compatible with the program. All suggestions 
	for improvements are gratefully received and taken into consideration 
	when updating the program. 
	Contact information is in the end of this file.


==============================================================================


Contents:
---------
	1. Introduction
	2. Definition of coordinate systems
	3. Physical structure of program / files
	4. Input files
	5. Operating the program 'CooC'
	6. Known bugs and inconsistencies
	7. References / more information



1. Introduction
---------------
This program is designed to convert coordinates given in one coordinate system 
to those in some other system. Available coordinate systems are 'horizontal', 
'equatorial', 'ecliptic' (geosentric), 'galactic', 'old galactic', 'super-
galactic', and 'supergalactic cartesian' coordinate system. In a later version 
also heliosentric and toposentric ecliptic systems are to be included. 

Note that there is also a web version of this program, which is more regularly 
updated. However, the program engine, a module file doing the actual 
conversions, is the same in both versions. Please, find the WWW version 
through my home page, which is mentioned at the end of this file.

This version of the program was compiled with ABSOFT fortran90 compiler in 
SuSE Linux 9.0. If it does not work in other versions or distributions, please 
let me know.


2. Definition of coordinate systems
-----------------------------------
The available coordinate systems are explained in this chapter. Only a basic 
definition is included here and interested users are adviced to seek out more 
information from the list of references in the end of this help file.

Horizontal coordinate system
	Its reference plane is the tangent plane ot the Earth passing through 
	the observer; this horizontal plane intersects the celestial sphere 
	along the horizon.
	  One of the coordinates is the azimuth, A; it is the angular distance 
	of the vertical of the object from some fixed direction. Although the 
	practice varies, in this program the azimuth is measured 
	counterclockwise from the north. The values are between 0 and 360 
	degrees in format 'ddd mm ss.s' where ddd symbolizes degrees, mm 
	minutes, and ss.s seconds.
	  The second coordinate is the altitude, a, which is measured from the 
	horizon along the vertical passing through the object. Its values are 
	between -90 and 90 degrees in format 'dd mm ss.s' where ddd symbolizes 
	degrees, mm minutes, and ss.s seconds. Values are positive for objects 
	above the horizon and negative for the objects below the horizon.

Equatorial coordinate system
	The direction of the rotation axis of the Earth remains almost 
	constant and so does the equatorial plane perpendicular to this axis. 
	Therefore the equatorial plane is a suitable reference plane for a 
	coordinate frame that has to be independent of time and the position 
	of the observer.
	  The zero point of the first coordinate is called the vernal equinox. 
	The coordinate is the angle from the vernal equinox measured along the 
	equator counterclockwise. It is called the right ascension, <alpha> or 
	R.A. The values are between 0 and 24 hours in format 'hh mm ss.s' 
	where hh symbolizes hours, mm minutes, and ss.s seconds (1h = 15deg).
	  The angular separation of a star from the equatorial plane is not 
	affected by the rotation of the Earth. This angle is called the 
	declination, <delta> or dec. The values are between -90 and 90 degrees 
	in format 'dd mm ss.s' where dd symbolizes degrees, mm minutes, and 
	ss.s seconds.


Ecliptic coordinate system
	The orbital plane of the Earth has another important coordinate frame, 
	the ecliptic, as its reference plane. This frame is used mainly for 
	planets and other bodies of the solar system. At the vernal equinox 
	(see 'Equatorial coordinate system'), the Sun's right ascension and 
	declination are zero. The equatorial and ecliptic planes intersect 
	along a straight line directed towards the vernal equinox. Thus we can 
	use this direction as the zero point for ecliptic system as well.
	  The first coordinate is the ecliptic longitude, <lambda>, measured 
	along the ecliptic plane counterclockwise from the vernal equinox. The 
	values are between 0 and 360 degrees in format 'ddd mm ss.s' where ddd 
	symbolizes degrees, mm minutes, and ss.s seconds.
	  The other coordinate, ecliptic latitude, <beta>, is the angular 
	distance from the ecliptic. The values are between -90 and 90 degrees 
	in format 'dd mm ss.s' where dd symbolizes degrees, mm minutes, and 
	ss.s seconds.


Galactic coordinate system
	For studies of more distant galactic objects or somewhat closeby 
	extragalactic objects, a natural reference plane is the plane of the 
	Milky Way. Since the Sun lies very close to that plane, we can put the 
	origin at the Sun.
	  The galactic longitude, l, is measured counterclockwise from the 
	direction of the centre of the Milky Way (in Sagittarius, 
	R.A. = 17h 45.7min, dec. = -29deg). The values are between 0 and 360 
	degrees in decimal format 'ddd.d' where ddd.d symbolizes degrees.
	  The galactic latitude, b, is measured from the galactic plane, 
	positive northwards and negative southwards. The values are between 
	-90 and 90 degrees in decimal format 'dd.d' where dd.d symbolizes 
	degrees.


Old galactic coordinate system
	Old galactic coordinate system was identical to the (new) galactic 
	coordinate system in all respects except that its zero point was at 
	the intersection of the equator and the galactic plane. To 
	differentiate old and new galactic systems from each other, l(I) and 
	b(I) are used for the old coordinates. For the new coordinates l(II) 
	and b(II) were used during the transition phase (in 1960s).


Supergalactic coordinate system
	For studies of more distant extragalactic objects, the most natural 
	coordinate system is the supergalactic coordinate system. The 
	reference plane of this system is defined by de Vaucouleurs as the 
	plane where the density of galaxies in our environment is the largest.
	  The supergalactic longitude, SGL, is measured counterclockwise from 
	the direction l = 137.37deg, b = 0deg. The values are between 0 and 
	360 degrees in decimal format 'ddd.d' where ddd.d symbolizes degrees.
	  The supergalactic latitude, SGB, is measured from the supergalactic 
	plane, positive northwards and negative southwards. The values are 
	between -90 and 90 degrees in decimal format 'dd.d' where dd.d 
	symbolizes degrees.
  

Supergalactic cartesian coordinate system
	Supergalactic cartesian coordinate system is, just as is visible from 
	its name, a cartesian version of the supergalactic coordinate system. 
	To calculate the supergalactic SGX, SGY, and SGZ one has to know the 
	coordinates in some other system and also the distance of the object. 
	By definition the direction of SGX has values SGL = 0deg, SGB = 0deg, 
	that of SGY has SGL = 90deg, SGB = 0deg, and that of SGZ has 
	SGL = 0deg, SGB = 90deg.



3. Physical structure of program / files
----------------------------------------
The conversion program consists of the following components:
	'CooC.exe'     - executable main program and user interface,
	'coocmod'      - conversion subroutines,
	'InitLoc.lis'  - default location, time, and epoch are read from here, 
	'InitCoo.lis'  - objects' input coordinates are read from here,
	'InitDist.lis' - distances of objects are read from here,
	'*.bak'        - all the above initialization .lis files have backups
			   just in case user somehow renders them useless,
	'CooCini.lis'  - auxiliary input file that the program creates so that 
			   it will not and can not change user's original 
			   initcoo.lis input file,
	'CooChelp.txt' - this help file, and
	'FinalCoo.lis' - the results of conversions.

Files 'cooc' and 'coocmod' are required to run Coordinate Conversions in 
Astronomy. They are executables and therefore user can not affect the way 
program works (however, all suggestions are gratefully received and duly 
considered if sent to the address in the end of this file). File 'InitLoc.lis' 
is also required to run the program. These three files should be in the same 
directory into which the output files are created as well.

File 'InitCoo.lis' is optional. It is required if the user wants to give input 
from a file (e.g. if he wants to process a large number of objects at a time). 
File 'InitDist.lis' is also optional and is required only if user wants 
conversions from any other system to supergalactic cartesian coordinates. 
Instructions on the input layout are given in the chapter 5: Operating the 
program 'CooC'.

Output of the program is directed both to screen and into a file 
'FinalCoo.lis', which consists of all conversions made between starting and 
quitting the program. Whenever the program is started, the old 'FinalCoo.lis' 
is deleted and a new one created. Users running lots of conversions should 
keep this in mind.  !!!



4. Input files
--------------
In this chapter all possible input files are explained and exampled. In every 
file the data should start from the very first line - otherwise the program 
misinterprets the file to be empty. The object names can not have empty spaces 
in them - otherwise the program reads only the characters before the (first) 
space.



The obligatory input file 'InitLoc.lis' looks like this (default settings):

++++++++++ start example file ++++++++++

-22 26 42.0     +60 24 57.0     12 0 0          1950 1 1
-22 26 42.0     +60 24 57.0     12 0 0          2000 1 1
END-O-FILE

+++++++++++ end example file +++++++++++

The first line defines the geographical location, time, and epoch used to 
convert coordinates from (in those conversions where they are needed). First 
the geographical longitude is given (in this case that of Tuorla Observatory) 
(in format 'ddd mm ss.s', where ddd symbolizes degrees, mm minutes, and ss.s 
seconds.), then the geographical latitude (in similar format), then the time 
(in format 'hh mm ss.s', where hh symbolizes hours, mm minutes, and ss.s 
seconds), and in the end the epoch (in format 'yyyy mm dd', where yyyy 
symbolizes the year, mm the month, and dd the day).
The second line gives the same values for the result coordinates.
Note that  1st JAN 2000, 12:00 am (noon)  is the defined standard zero point 
of J2000 epoch (and  1st JAN 1950, 12:00 am that of B1950 epoch).
Any (sensible) value can be given to any field in the above file as long as 
the formatting stays the same. Only two lines are read from this file even if 
there were more in it. The 'END-O-FILE' flag in the end of the file is not 
compulsory.


The optional input file 'InitDist.lis' looks like this:

++++++++++ start example file ++++++++++

721.11

+++++++++++ end example file +++++++++++

There is one value per line. The value is the distance of the object from the 
centre of the earth (it can be from the toposentric location of measurement, if
the object is distant and errors amount to more than thousands of kilometres). 
The unit of the distance can be anything (light-years, parsecs, or anything 
really) as long as the user remembers that the output values (in supergalactic 
cartesian coordinates) are in the same units. There is no limit to the number 
of lines written to this file but the number must be the same as that in the 
file 'initcoo.lis' of which there are examples in the following. This is the 
only file in which there _must not be_ the 'END-O-FILE' flag in the end of the 
file.


Horizontal coordinate system:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

123 12 44.7	-31 55 21.2	M31
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first field contains three numbers: the 
degrees, minutes, and seconds of azimuth. The second field likewise contains 
three numbers: the degrees, minutes, and seconds of altitude. The third 
field contains the name of the object. There is no limit to the number of 
objects (lines) written to this file.


Equatorial coordinate system:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

00 40 00.13	+40 59 42.7	1950.0		NGC_0224
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first field contains three numbers: the 
hours, minutes, and seconds of right ascension. The second field likewise 
contains three numbers: the degrees, minutes, and seconds of declination. The 
third field contains the epoch of these coordinates and the fourth the name of 
the object. There is no limit to the number of objects (lines) written to this 
file.


Ecliptic coordinate system:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

123 12 44.7	-31 55 21.2	2000.0		UGC_00454
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first field contains three numbers: the 
degrees, minutes, and seconds of ecliptic longitude. The second field likewise 
contains three numbers: the degrees, minutes, and seconds of ecliptic latitude.
The third field contains the epoch of these coordinates and the fourth the 
name of the object. There is no limit to the number of objects (lines) written 
to this file.


Galactic and old galactic coordinate systems:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

121.18		-21.57		Andromeda_galaxy
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first field contains one number: the decimal 
degrees of the galactic longitude. The second field likewise contains one 
number: the decimal degrees of galactic latitude. The third field contains the 
name of the object. There is no limit to the number of objects (lines) written 
to this file.


Supergalactic coordinate system:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

336.19		12.55		Messier31
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first field contains one number: the decimal 
degrees of the supergalactic longitude. The second field likewise contains one 
number: the decimal degrees of supergalactic latitude. The third field 
contains the name of the object. There is no limit to the number of objects 
(lines) written to this file.


Supergalactic cartesian coordinate system:
The optional 'InitCoo.lis' file looks like this:

++++++++++ start example file ++++++++++

644.1		-284.4		157.3		M_31
END-O-FILE

+++++++++++ end example file +++++++++++

There is one object per line. The first three fields contain one value each: 
SGX, SGY, and SGZ. The fourth field contains the name of the object. There is 
no limit to the number of objects (lines) written to this file.



5. Operating the program 'CooC'
-------------------------------
If all the necessary files (defined in chapters 3: Operating the program 
'CooC' and 4: Input files) exist in the same directory, the program can be run 
with the command 'CooC.exe' (or './CooC.exe' in some cases). The program asks 
the user some questions, makes the conversions, and lets user either to quit 
or continue.

First CooC wants to know the from and to coordinate systems of conversion. Any 
system on the list can be given to either question (e.g. if user wants to 
convert equatorial coordinates from one epoch to another, he just selects 
equatorial coordinates as both from and to system). Next CooC asks if user has 
got an input file (and wants to use it), and if he wants to change the default 
location, time, or epoch (read from a file). The questions asked depend on the 
from and to coordinates (e.g. epoch is not needed in conversions between 
galactic and supergalactic systems, therefore it is not asked).

If the input file was given as the source of input, the program now calculates 
the conversions. Otherwise it asks more questions from the user. These 
questions concern the input coordinates and possibly some other issues. The 
name of the object is asked every time (to keep track of the conversions if 
several are made). If user is making only a few conversions or for some other 
reason doesn't give in the name a default name 'No name' is issued to the 
object.

After the conversions are made the program writes them out both to screen and 
into the output file (FinalCoo.lis). In the end CooC asks whether user wants 
to continue with more conversions, to quit, or (if input was not given from a 
file) if user wants to continue with previously given initial values (these 
being the from and to coordinate systems, location, time, and epoch). If user 
continues, the new results are written to the end of the output file after the 
previous results. If, however, user quits the program and starts it again 
(e.g. to change the input file contents in between) the new results are 
written to the output file (FinalCoo.lis) by first destroying the old file. 
Therefore it is imperative that user extracts his output coordinates from the 
file 'FinalCoo.lis' before starting the program again.  !!!



6. Known bugs and inconsistencies
---------------------------------
Items on this list are, or at least should be, under further development in 
order to improve the program and avoid undesirable (erroneous) results of 
conversion processes. However, user should always remember to be careful with 
his input data and not to accept blindly the output.

Although much care has been put into a flexible, error seeking input (see 
chapter 5: Operating the program 'CooC'), it is still possible to end up with 
unexpected results due to the process that allows user to enter only part of 
the input parameters (e.g. to give only 2h 15.5min as input right ascension 
instead of 2h 15min 30sec). If user accidentally hits a non-numerical key that 
input field is interpreted as 0 (zero). E.g. input fields '2 1%.5' and 
'2 15.t' are forwarded to other parts of program as '2 0 0'.

The great improvement that came upon calendar on 15th OCT 1582 (calendar type 
changed from Julian to Gregorian) means that (at the moment) this program does 
not calculate correctly conversions with epoch less than 1582.786. Due to 
other, cumulative errors it is recommended that user should be very cautious 
with all epochs further than a few hundred years from J2000.0.



7. References / more information
--------------------------------
The reference list of sources used to put this program together is given below 
(in alphabetical order, not order of importance).

	Blaauw, A., Gum, C. S., Pawsey, J. L., Westerhout, G., 1958, MNRAS,
		121, 2, 10: The New I.A.U. System of Galactic Coordinates
	de Vaucouleurs, G., de Vaucouleurs, A., Corwin, Jr., H. G., Buta, R. 
		J., Paturel, G., Fouque, P., 1991, Third Reference Catalogue 
		of Bright Galaxies, New York: Springer-Verlag
	Duffett-Smith, P., 1988, Practical Astronomy with Your Calculator,
		Cambridge: Cambridge University Press
	Foster, K. W., Wall, J., 1997, The Astronomical Almanac for the Year 
		1998, Washington: U.S. Government Printing Office
	Karttunen, H., 1995, Taivaanmekaniikan luentomoniste
	Karttunen, H., Donner, K. J., Kroger, P., Oja, H., Poutanen, M., Eds., 
		1995, Tahtitieteen perusteet, Helsinki: Tahtitieteellinen 
		yhdistys Ursa
	Lang, K. R., 1974, Astrophysical Formulae, Berlin: Springer-Verlag
	McNally, D., 1974, Positional Astronomy, Bristol: Muller Educational
	Seidelmann, P. K. Ed., 1992, Explanatory Supplement to the Astronomical
		Almanac, Mill Valley: University Science Books
	Torgard, I., 1961, Lund Observatory Table for the Conversion of 
		Galactic into Equatorial Coordinates, Lund: Lund Observatory



-------------------------------------------------------------------------------
The author of this help file and the programs and modules mentioned therein nor
his colleagues or any institute or other agency related to the abovementioned
author can be held responsible in any way if users of the mentioned programs,
modules, or files are subjected to any temporary or permanent loss of files, 
computing power, or hair due to the correct or incorrect usage of the programs
or files having a direct or indirect connection to the abovementioned programs,
modules, and files.


(C) - 1998   Rami Rekola / Tuorla Observatory
             FI-21500  PIIKKIO, Finland
             Tel.  +358 2 333 8981
             email:  rareko@astro.utu.fi
             WWW:  http://www.astro.utu.fi/~rareko/
