healpix_plotter.py 760 Bytes
Newer Older
1
2
3
from nifty.spaces import HPSpace

from nifty.plotting.figures import Figure2D
4
from nifty.plotting.plots import HPMollweide
Theo Steininger's avatar
Theo Steininger committed
5
from .plotter_base import PlotterBase
6
7


Theo Steininger's avatar
Theo Steininger committed
8
class HealpixPlotter(PlotterBase):
9
10
    def __init__(self, interactive=False, path='.', title="", color_map=None):
        self.color_map = color_map
Theo Steininger's avatar
Theo Steininger committed
11
        super(HealpixPlotter, self).__init__(interactive, path, title)
12
13
14
15
16

    @property
    def domain_classes(self):
        return (HPSpace, )

Theo Steininger's avatar
Theo Steininger committed
17
18
    def _initialize_plot(self):
        result_plot = HPMollweide(data=None,
19
                                  color_map=self.color_map)
20
        return result_plot
Theo Steininger's avatar
Theo Steininger committed
21
22
23

    def _initialize_figure(self):
        return Figure2D(plots=None)
24
25
26

    def _parse_data(self, data, field, spaces):
        return data