Welcome to the PPM star catalog converter!

Where can I find the PPM star catalog?

How can I cut it down to size?

Patience! Patience!

This attempt at documentation briefly describes the purpose and use of PPM2BIN.EXE.

Please report bugs and comments to the author:
Tony Hugo
hugo@winshop.com.au

Updates available at: http://www.geocities.com/SiliconValley/Sector/3169/ppm2bin.html Your looking at it...

First a little history...

Well, I had this asteroid locator program, see, that I wrote in the 80's and it needed updating. There was just one teeny-weeny thing wrong... The star map was ancient and all the asteroids were in the wrong place!

Getting the asteroids fixed is another story. This page relates to the star catalog.

After some perusal of the source code (written with the Mark Williams LETS C compiler if you're interested)
(nah, I didn't think so)
I found I needed a source of RECENT star positions to plot the asteroids against a starry sky. The stars I had were vintage 1980's stuff and woefully out of date (ecliptic 1950 IIRC).

Then I heard about the PPM catalog...
This stands for "POSITIONS & PROPER MOTIONS" catalog.
The RASNZ supplied info on asteroid occultations by PPM stars and I thought to myself...

"I just gotta get me one of those."

So I did. 20 megs by FPT.
Made up to 60 megs of it, ungzipped.

Next problem concerned getting this information down to a more managable size. So I wrote a program to search the catalog for stars of the right magnitude range and put them in a binary file compatiable with my asteroid finder.

Then my hard disk crashed BIG TIME.

So I downloaded the catalog all over again. (sigh)

After I was done, I realised that others might like to do something similar.
Hence this release to the general public.

Don't all clap at once...

The PPM Star Catalog

This catalog is available on the internet, and is a monumental opus in four parts. (that's all I could find).
My thanks to Roeser and Bastian, and others involved!

PPMNORTH 181731 stars from the north pole to -2.5deg declination.
PPMSOUTH 197179 stars from -2.5deg to the south pole.
PPM_BSS 275 bright stars somehow "missing" in the above.
PPM_SUPP 89676 suplementary stars in the southern regions.

468,861 stars ought to be enough for anyone, right?

Downloading

There are probably a few CDROMs somewhere that have this catalog on it as well as many other catalogs. However, I downloaded it from the internet by FPT.

Available from the Astronomical Data Centre.

FTP to: ftp://adc.gsfc.nasa.gov/pub/adc/archives/catalogs/1/ and look for these catalog numbers:

1146 PPM catalog (north)
1193 PPM catalog (south)
1206 Bright star supplement to the PPM
1208 90,000 supplement to the PPM

Each catalog has a number of files.
Download the README and DESCRIPTION text files for each one and the catalog names:

ppmnorth.dat.gz
ppmsouth.dat.gz
ppm_bss.dat.gz
ppm_supp.dat.gz

Be warned, the first two are approx. 7 meg downloads and the last one about 3 megs!

These files have been compressed using a public-domain utility called gzip. To decompress the file (which will result in files ppmxxxx.dat), type
gunzip ppmnorth.dat.gz

gzip code is available at prep.ai.mit.edu/pub/gnu/gzip-1.2.4.tar (UNIX version) and prep.ai.mit.edu/pub/gnu/gzip-1.2.4.msdos.exe (DOS version). The gzip software accommodates both the gzip and the gunzip commands.

Find and run gzip.exe or gunzip.exe to produce the text files and rename (if necessary) to *.dat.
You should have:

ppmnorth.dat 22,938,509 bytes
ppmsouth.dat 25,581,785 bytes
ppm_bss.dat 35,397 bytes
ppm_supp.dat 11,834,844 bytes

Note: If 6.0 mgnitude is sufficient for your needs, the first three are all that is required. The supplementry catalog makes it almost complete to the ninth magnitude, with a LOT of stars fainter.

Hint: While you are busy FTPing these files, look around for index or "key" files which list all catalogs available. Then drool....

CUTTING THINGS DOWN TO SIZE: 

USING THE PROGRAM: PPM2BIN.EXE

Download PPM2BIN Now! PPM2BIN.ZIP

PPM2BIN is my program that reads in the ppmxxx.dat files and outputs a binary file suitable for use in my asteroid locator. This is version 1.0 of the program. It is an MSDOS program using Turbo C 2. (old but good).

If it will not run on your WIN9x system, let me know and I can send a protected mode version written with DJGPP...

SYNTAX of PPM2BIN

ppm2bin [catalog] [outfile] [format] [Limits...]

ppm2bin ppmnorth.dat ppmdat.bin bnmsRD 6.0 -99

Note: the parameters are optional, but (if used) MUST be in this order!

[catalog] The PPM fragment file name. default is ppmnorth.dat
[outfile] The output file name. default is ppmdat.bin
[format] The required format of the output file. default is bnmsRD
[Limits] Magnitude limits, upper and lower. default is 6.0 and above.

PPM2BIN with no parameters will use ppmnorth.dat to create ppmdat.bin with a list of all stars found of magnitude 6.0 and above, in a binary format of 16 bytes per star.

PPM2BIN will provide default values for unused parameters, as shown in the example command line above.

FORMAT DEFINITION

The output format is user-specified by including a format string of characters (without spaces). Most of these codes only affect the binary formats. Only 'c', 't' and 'a' affect text output in this version.

PPM2BIN recognises the following characters: (CASE SENSITIVE)

(They can be included in any desired order)

char bytes type comment
f 16 default format: bnmsRD (16 bytes per star)
n 4 long PPM number
M 4 float magnitude eg. 8.9
m 2 short mag * 100
R 4 float Right Ascention (accuracy 0.01 sec RA)
r 2 short RA * 65536/24.0 (acc 1.3 sec)
D 4 float Declination (accuracy 0.08 arcsec)
d 2 short (Dec+90) * 65536/180.0 (acc 9.8 arcsec)
s 2 string spectrum "G5"
P 4+4 float Proper Motion

RA PM, DEC PM sec/yr, arcsec/yr

p 2+2 short RApm * 10000 sec/yr

Decpm * 1000 arcsec/yr

x 1 byte 1 extra zero byte per record in binary mode
X 2 bytes 2 extra zero bytes per record in binary mode
h 4 long Header included. No. of stars in file
1,2,4 1,2,4 bytes adds 1, 2 or 4 zero bytes to header
a

b

t

APPEND mode enabled

Binary output enabled

Text output file enabled

c 70 bytes Copy first 69 bytes of catalog to text file plus LF

used in conjunction with "t"

NEW OPTION!!

L 4+4bytes Store RA and Dec as long integers.
RA = number of seconds * 1000 (0.001 sec resolution)
DEC= number of arcsec * 100 (0.01 arcsec resolution) negative for southern declinations.

Now you can display only 8 arcseconds of sky in full screen mode without losing any accuracy!
(No! I don't know why you would want to do that!)

NOTES

Note: the default TEXT file lists RA and Dec as floating point numbers and each line ends in a CR/LF pair. The "c" option results in a copy of the input catalog line, of 69 characters plus the terminating Linefeed only.

Note2: The Header bytes will be written to disc only in the binary format. Version 1.0 simply outputs the star count as a header if "h" is specified. In APPEND mode, the "h" will allow the program to read in the first header and update it as more stars are added to the file.

[Limits...] If not specified, the default magnitude range is 6.0 and above. To search for a different range, specify two numbers separated by a space, such as 6.0 7.0 after the filenames and format code.

USING THE PROGRAM

Example 1: To obtain all stars to magnitude 6.0 and store in ppmdat.bin with: PPM number (4 bytes) Magnitude (2 bytes) Spectrum (2 bytes) RA (4 bytes - floating point) DEC (4 bytes - floating point) This is the default format.

ppm2bin ppmnorth.dat ppmdat.bin f
ppm2bin ppmsouth.dat ppmdat.bin af
ppm2bin ppm_bss.dat ppmdat.bin af

This will net all stars with mag. of 6.0 or brighter. (4514 stars)
Note that the last two commands have an additional "a" in the format definition so that the output files are appended together. The default magnitude limit is 6.0 so this can be omitted.
Suggestion: Create a BAT file with the above commands and run it.

Example 2: To generate a text file only, list stars to magnitude 7.0 incusive, use the following format: the text file will be 70 bytes per line:

ppm2bin ppmnorth.dat ppm.txt ct 7.0
ppm2bin ppmsouth.dat ppm.txt act 7.0
ppm2bin ppm_bss.dat ppm.txt act 7.0

Example 3: To create a file with magnitudes 8.1 to 9.0, using only 2 bytes for the RA, Dec and Mag. and 2 zero bytes per star, using a header for the star count:

ppm2bin ppmnorth.dat ppm.bin hbmrdX 8.0 9.0
ppm2bin ppmsouth.dat ppm.bin habmrdX 8.0 9.0
ppm2bin ppm_bss.dat ppm.bin habmrdX 8.0 9.0
ppm2bin ppmsupp.dat ppm.bin habmrdX 8.0 9.0

Example 4: To create a file to maintain the full resolution of the ppm catalog by storing RA and Dec as a 4 byte long integer as described above, followed by Magnitude (float) and 2 floating point values for propermotion...

ppm2bin ppmnorth.dat ppm.bin hbLMP 9.0
ppm2bin ppmsouth.dat ppm.bin ahbLMP 9.0
ppm2bin ppm_bss.dat ppm.bin ahbLMP 9.0
ppm2bin ppmsupp.dat ppm.bin ahbLMP 9.0

Enjoy!


Visiting Stargazers since July 1999

Return to Home Page

Asteroid (astorb.dat) converter program

Asteroid Locator program

SPACE FX Animator