Skip to content
Snippets Groups Projects

No more precomp

Merged Jameson Rollins requested to merge jameson.rollins/pygwinc:no-precomp into master
2 unresolved threads
1 file
+ 11
10
Compare changes
  • Side-by-side
  • Inline
+ 11
10
@@ -52,15 +52,21 @@ class BudgetItem:
##########
def __init__(self, freq, **kwargs):
def __init__(self, freq=None, **kwargs):
"""Initialize budget item.
Primary argument is the evaluation frequency array. Any
keyword arguments provided are simple written as attribute
variables in the initialized object.
The primary argument should be the evaluation frequency array.
If it is not provided, then it is assumed to be a pre-defined
attribute of the BudgetItem class. Any keyword arguments
provided are simple written as attribute variables in the
initialized object.
"""
self.__freq = freq
if freq is not None:
assert isinstance(freq, np.ndarray)
self.freq = freq
elif not hasattr(self, 'freq'):
raise AttributeError("Frequency array not provided or defined.")
for key, val in kwargs.items():
setattr(self, key, val)
@@ -76,11 +82,6 @@ class BudgetItem:
self.name,
)
@property
def freq(self):
"""Evaluation frequency array supplied at initialization."""
return self.__freq
def interpolate(self, freq, data):
"""Interpolate data to the evaluation frequencies.
Loading