<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Note For this to work, you will need the lsst.sims stack to be installed. 
 - opsimsummary uses healpy which is installed with the sims stack, but also available from pip/conda
 - snsims uses the lsst.sims stack.
Step1:  This section pertains to how to write a new Tiling class
```
noTile = snsims.Tiling()
TypeError                                 Traceback (most recent call last)
<ipython-input-9-5f6f8a94508e> in <module>()
----> 1 noTile = snsims.Tiling()
TypeError
Step2:  ```
Step4:  Using the class HealpixTiles
Currently there is only concrete tiling class that has been implemented. This is the snsims.HealpixTiles class.
This shows how to use the HealpixTiles Class
<ASSISTANT_TASK:>
Python Code:
import opsimsummary as oss
from opsimsummary import Tiling, HealpixTiles
# import snsims
import healpy as hp
%matplotlib inline
import matplotlib.pyplot as plt
Explanation: Note For this to work, you will need the lsst.sims stack to be installed. 
 - opsimsummary uses healpy which is installed with the sims stack, but also available from pip/conda
 - snsims uses the lsst.sims stack.
End of explanation
class NoTile(Tiling):
    pass
noTile = NoTile()
Explanation: This section pertains to how to write a new Tiling class
```
noTile = snsims.Tiling()
TypeError                                 Traceback (most recent call last)
<ipython-input-9-5f6f8a94508e> in <module>()
----> 1 noTile = snsims.Tiling()
TypeError: Can't instantiate abstract class Tiling with abstract methods init, area, pointingSequenceForTile, tileIDSequence, tileIDsForSN
```
The class snsims.Tiling is an abstract Base class. Therefore, this cannot be instantiated. It must be subclassed, and the set of methods outlined have to be implemented for this to work.
End of explanation
class MyTile(Tiling):
    def __init__(self):
        pass
    @property
    def tileIDSequence(self):
        return np.arange(100)
    
    def tileIDsForSN(self, ra, dec):
        x = ra + dec
        y = np.remainder(x, 100.)
        return np.floor(y)
    def area(self, tileID):
        return 1.
    def pointingSequenceForTile(self, tileID, pointings):
        return None
    def positions(self):
        pass
    
myTile = MyTile()
Explanation: ```
noTile = NoTile()
TypeError                                 Traceback (most recent call last)
<ipython-input-4-8ddedac7fb97> in <module>()
----> 1 noTile = NoTile()
TypeError: Can't instantiate abstract class NoTile with abstract methods init, area, pointingSequenceForTile, positions, tileIDSequence, tileIDsForSN
```
The above fails because the methods are not implemented. Below is a stupid (ie. not useful) but minimalist class that would work:
End of explanation
issubclass(HealpixTiles, Tiling)
help(HealpixTiles)
datadir = os.path.join(oss.__path__[0], 'example_data')
opsimdb = os.path.join(datadir, 'enigma_1189_micro.db')
NSIDE = 4
hpOpSim = oss.HealPixelizedOpSim.fromOpSimDB(opsimdb, NSIDE=NSIDE)
NSIDE
hpTileshpOpSim = HealpixTiles(healpixelizedOpSim=hpOpSim, nside=NSIDE)
hpTileshpOpSim.pointingSequenceForTile(1, allPointings=None)
phi, theta = hpTileshpOpSim.positions(1, 10000)
mapvals = np.ones(hp.nside2npix(NSIDE)) * hp.UNSEEN
mapvals[1] = 100
hp.ang2pix(NSIDE, np.radians(theta), np.radians(phi), nest=True)
theta_c, phi_c = hp.pix2ang(4, 1, nest=True)
hp.mollview(mapvals, nest=True)
hp.projscatter(np.radians(theta), np.radians(phi), **dict(s=0.0002))
hp.projscatter(theta_c, phi_c, **dict(s=8., c='r'))
%timeit hpTileshpOpSim.pointingSequenceForTile(33, allPointings=None)
preCompMap = os.path.join(oss.__path__[0], 'example_data', 'healpixels_micro.db')
hpTilesMap = HealpixTiles(nside=1, preComputedMap=preCompMap)
hpTilesMap.pointingSequenceForTile(10, allPointings=None)
%timeit hpOpSim.obsHistIdsForTile(34)
hpTiles = HealpixTiles(healpixelizedOpSim=hpOpSim)
hpTiles.pointingSequenceForTile(34, allPointings=None)
Explanation: Using the class HealpixTiles
Currently there is only concrete tiling class that has been implemented. This is the snsims.HealpixTiles class.
This shows how to use the HealpixTiles Class
End of explanation
<END_TASK>