power_space.py 1011 Bytes
Newer Older
theos's avatar
theos committed
1
2
# -*- coding: utf-8 -*-

theos's avatar
theos committed
3
4
import numpy as np

theos's avatar
theos committed
5
from nifty.space import Space
theos's avatar
theos committed
6
from nifty.nifty_paradict import power_space_paradict
theos's avatar
theos committed
7
8
9


class PowerSpace(Space):
10
    def __init__(self, distribution_strategy, dtype=np.dtype('float'),
theos's avatar
theos committed
11
12
13
14
15
16
17
18
19
20
                 log=False, nbin=None, binbounds=None):
        self.dtype = np.dtype(dtype)
        self.paradict = power_space_paradict(
                                distribution_strategy=distribution_strategy,
                                log=log,
                                nbin=nbin,
                                binbounds=binbounds)
        # Here it would be time to initialize the power indices
        raise NotImplementedError

21
22
23
24
        self.distances = None

        self.harmonic = True

theos's avatar
theos committed
25
26
27
28
29
30
31
32
33
34
35
    def calculate_power_spectrum(self):
        raise NotImplementedError

    def cast_power_spectrum(self):
        raise NotImplementedError

    def get_weight(self, power=1):
        raise NotImplementedError

    def smooth(self):
        raise NotImplementedError