In this project you will create a program that processes an ASCII star catalog file. The link below shows where you can find the file. As with many large data files, you will need to un-compress the "gz" file.
A GZ file is an archive file compressed by the standard GNU zip (gzip).
Hint: look at Python slice strings to extract the data.
Create a program that reads the star catalog file and displays various statistics
Note: A line is the complete data entry for a star. (one line, one star)
A location where you can download a star catalog ...
bsc5.dat.gz is the ASCII star catalog data file. (one star per line)
bsc5.readme is the star catalog description (includes the catalog data format).
Extracting data from the catalog records (one line, one star) has some quirks. I suggest you look at Python slice strings. Slice strings are indexed starting with zero (0). The data description indexing starts with one (1). Also the slice string's starting index is inclusive and the ending index is exclusive.
slice index | data description index |
---|---|
0 | 1 |
1 | 2 |
2 | 3 |
... | ... |