-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSeasonalityCalibSite.py
41 lines (27 loc) · 1.02 KB
/
SeasonalityCalibSite.py
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
36
37
38
39
40
import logging
import calendar
from abc import ABCMeta
from calibtool.CalibSite import CalibSite
from ChannelByMultiYearSeasonCohortInsetAnalyzer import ChannelByMultiYearSeasonCohortInsetAnalyzer
from Helpers import get_cases
logger = logging.getLogger(__name__)
class SeasonalityCalibSite(CalibSite):
__metaclass__ = ABCMeta
def __init__(self, hfca=None, **kwargs):
self.metadata = {
'HFCA': hfca
}
if 'throwaway' in kwargs:
self.throwaway = kwargs['throwaway']
else :
self.throwaway = 0
self.name = hfca
super(SeasonalityCalibSite, self).__init__(hfca)
def get_reference_data(self, reference_type):
super(SeasonalityCalibSite, self).get_reference_data(reference_type)
# Load the case CSV
reference_data = get_cases(self.metadata['HFCA'])
return reference_data
def get_analyzers(self):
return [
ChannelByMultiYearSeasonCohortInsetAnalyzer(site=self, throwaway=self.throwaway)]