-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlw_observable.py
More file actions
35 lines (32 loc) · 1.39 KB
/
lw_observable.py
File metadata and controls
35 lines (32 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
long wavelength observable abstract class
Methods must be implemented
"""
from __future__ import division,print_function,absolute_import
from builtins import range
class LWObservable(object):
"""abstract class for lw obserables."""
def __init__(self,geos,params,survey_id,C):
"""inputs:
geos: a numpy array of geos
params: a dictionary of params
survey_id: an id from the associated LWSurvey
C: a CosmoPie object
fisher_type is True, will get_fisher from this object, otherwise use get_perturbing_vector"""
self.geos = geos
self.C = C
self.params = params
self.survey_id = survey_id
self.fisher_type = True
# def get_dO_a_ddelta_bar(self):
# """
# get_dO_a_ddelta_bar must be implemented by subclass, should return a numpy array with the first axis being z bins of geo
# return array of vectors representing derivative of observable wrt \bar{delta}
# """
# raise NotImplementedError('Subclasses of LWObservable must implement get_dO_I_ddelta_bar')
def get_fisher(self):
"""return a FisherMatrix object associated with the observable"""
raise NotImplementedError('Subclasses of LWOobservable must implement get_fisher')
def get_survey_id(self):
"""return the id string associated with the survey"""
return self.survey_id