datetime.fromisoformat was only introduced in 3.7, and I don't feel like
jumping through any hoops to try to maintain compatibility with older versions
at the moment.
We need to do a better job of ignoring nonexistent tiles, and also be careful
about handling whether the existing tiles have 3 or 4 color channels (e.g, RGB
vs. RGBA) in them.
This takes a big RGB image, loads it into memory, and breaks it into tiles for
future visualization as a WWT "study". The process is pretty straightforward
because it is not actually necessary to know anything about the image
coordinates on the sky, or do any downsampling.
There was a script to do the resampling, so this was easier to get back
than I expected. Here's what I ran:
```
import numpy as np
import healpy as hp
from astropy.coordinates import Galactic, ICRS
import astropy.units as u
nest = True
map = hp.read_map('earth_healpix_equ.fits', nest=nest)
theta, phi = hp.pix2ang(64, np.arange(map.size), nest)
l, b = phi, np.pi / 2 - theta
g = Galactic(l * u.rad, b * u.rad)
f = g.transform_to(ICRS)
ra, dec = f.ra.rad, f.dec.rad
map = hp.get_interp_val(map, np.pi / 2 - dec, ra, nest)
hp.write_map('earth_healpix_gal.fits', map, nest=nest, coord='G', fits_IDL=False, column_names='I')
```
The images used in the test data set were based on the famous "Lena" test
image, which -- besides not being helpful for providing an intuitive grasp of
the spherical projections at play -- is now widely recognized as problematic.
So, we have replaced these images with new ones. The basis image is
`Equirectangular_projection_SW-tweaked.jpg`, which is derived from the
following Wikimedia asset:
<https://commons.wikimedia.org/wiki/File:Equirectangular_projection_SW.jpg>,
associated with <https://en.wikipedia.org/wiki/Equirectangular_projection>.
The recommended Wikimedia credit line is: Strebe - Own work, CC BY-SA 3.0,
<https://commons.wikimedia.org/w/index.php?curid=16115228>. I modified the
image by cropping a small border and resizing to a reasonable size for the Git
repository.
I created a HEALPixified version of this image, which is in a plate carree
projection, with the following script:
```
import healpy as hp
from matplotlib.image import pil_to_array
import numpy as np
from PIL import Image
IMG_PATH = 'toasty/tests/Equirectangular_projection_SW-tweaked.jpg'
NSIDE = 64
array = pil_to_array(Image.open(IMG_PATH))
grayscale = (array.sum(axis=2) // 3).astype(np.uint8)
colat = np.linspace(0, np.pi, grayscale.shape[0])[:, None]
lon = np.linspace(np.pi, -np.pi, grayscale.shape[1])
pix = hp.ang2pix(NSIDE, colat, lon)
healpix = np.zeros(hp.nside2npix(NSIDE), dtype=grayscale.dtype)
healpix[pix] = grayscale
hp.fitsfunc.write_map('healpix.fits', healpix, fits_IDL=False, column_names='I')
```
I haven't yet bothered with a version in Galactic coordinates, so I removed
the corresponding test case. I also removed the `test_planet` files which I
were unused.