Add range checking to Catalog.flag_saturated class method

Internal flags, accessible through the FLAGS catalog parameter, are,
although coded in decimal, computed by SExtractor as the sum of the
first eight powers of two (exponents 1-7). Therefore, the minimum
possible value is zero (0b00000000) and the maximum 255 (0b11111111).
Raise the ValueError exception in case the decimal value of the flag
is outside of this range.
Add unit test for Catalog.flag_saturated
Fix bug in Catalog.flag_saturated

Although Catalog.flag_saturated returns the correct value for all
possible SExtractor flags, the algorithm does not work correctly for
flags smaller than four: the length of the string returned by bin() is
always greater than or equal to three, because of the '0b' prefix, and
therefore the value checked is not that of the third least significant
bit, but the '0' or the 'b' in the prefix. For example, bin(2) returns
'0b10', and '0b10'[-3] is 'b', which is not equal to '1', so False is
returned — although only by chance.

In order to fix this, get rid of the '0b' prefix and fill in with
zeros so that SExtractor flags are always represented as eight-bit
binary numbers.
Add sample SExtractor catalog

This SExtractor catalog, with 127 sources detected, will be used in
the unit test for the astromatic.Catalog.__init__ method — we need to
verify that SExtractor catalogs are correctly parsed.
Add sample SExtractor catalog with missing parameter

When a SExtractor catalog is parsed, the information needed to
instantiate each Star object, one per source detected, is extracted
from the following parameters: X_IMAGE, Y_IMAGE, ALPHA_SKY, DELTA_SKY,
ISOAREAF_IMAGE, MAG_AUTO, FLUX_ISO, FLUXERR_ISO, FLUX_RADIUS, FLAGS
and ELONGATION — all of which must be present. This catalog, where
'DELTA_SKY' is missing, and as will be verified when the unit test
is written, should make Catalog.__init__ raise ValueError.
Add sample SExtractor catalog in ASCII format

The catalogs parsed by Catalog.__init__ must be in the ASCII_HEAD
format, as the header containing information about their content is
needed in order to determine in which column each parameter is
located. This one, with 23 sources and in the ASCII format, will be
used in the unit test to verify that ValueError is raised if the
SExtractor catalog is in a format other than ASCII_HEAD.
Add unit test for Catalog.__init__
Add unit test for Catalog.get_image_coordinates
Make the Pixel class immutable

The implementation of the Pixel class can be enormously simplified if,
instead of 'object', we use a named tuple (collections.namedtuple) as
its base class. In this manner, Pixel becomes a tuple-like class whose
fields (the x- and y-coordinates) are accessible by attribute lookup.
Note that this means that Pixel becomes immutable — it is now a tuple
subclass with named fields. We will need to use _replace() to get a
new instance where one or the two coordinates are modified.
Remove unnecessary unit tests for Pixel

There is no need to unit test the Pixel.__init__, __repr__, __eq__
and __hash__ magic methods: they are inherited from the base class,
collections.namedtuple, and we do not override them in the subclass.
Merge PixelTest.rargs into PixelTest.random
Add unit test for the immutability of the Pixel class
Make the Star class immutable

As we have done with Pixel in commit 4b8da3165fdd, make the Star class
inherit from collections.namedtuple, so that it becomes an immutable
tuple-like class whose fields are accessible by attribute lookup.
Add unit test for the immutability of the Star class
Read SExtractor catalog only once

Avoid loading the entire SExtractor catalog into memory every time
that the index of a parameter must be determined. Instead, do it only
once, at instantiation, and make Catalog._find_column take as inputs
not only the name of the parameter but also the contents of the file.
As a consequence of this change, the Catalog._read_catalog method is
no longer needed and can be removed.
Make Catalog._find_column static

The method does not need access to instance data, as the contents of
the SExtractor catalog are now taken as input, so simplify the code by
making it static. Note that this means that we can no longer cache the
indexes internally — this is not much of a problem, nevertheless, as
we plan to be able to use our memoization decorator soon.
Make Catalog._load_stars a class method — and return a generator

Modify Catalog._load_stars so that it does not add the Star objects to
the instance on which it is called, but instead becomes a class method
and returns a generator, which is passed to the __init__ method of the
superclass, list.
Make the Catalog class immutable

A SExtractor catalog is a collection of Stars which there is no point
in modifying, as its purpose it to detail the sources detected in an
astronomical image. It is thus better to use tuple, not list, as the
base class, so that Catalog objects become immutable.
Add unit test for the immutability of the Catalog class
Find the index of each parameter only once in Catalog._load_stars

The column in which each parameter is located in a catalog is always
the same, so we do not need to call Catalog._find_column() for each
line (that is, detected source) in the file. Do it just once, at the
beginning of Catalog._load_stars, before iterating through the
non-commented lines of the SExtractor catalog.