Closed matthewdahmer closed 2 years ago
Updating the epoch for a model using the following code:
from xija import get_model_spec, ThermalModel tstart = '2020:100:00:00:00' tstop = '2022:100:00:00:00' model_spec, version = get_model_spec.get_xija_model_spec('aca') model = ThermalModel('aca', start=tstart, stop=tstop, model_spec=model_spec) model.comp['aca0'].set_data(-10) model.make() model.comp['solarheat__aca0'].epoch = '2022:090'
Results in the following error:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /var/folders/dy/fgd_00hx3t74rh7tfkw5btqw0000gn/T/ipykernel_67275/2145554458.py in <module> 8 model.comp['aca0'].set_data(-10) 9 model.make() ---> 10 model.comp['solarheat__aca0'].epoch = '2022:090' ~/opt/miniconda3/envs/ska3test/lib/python3.8/site-packages/xija/component/base.py in __setattr__(self, attr, val) 90 self.pars_dict[attr].val = val 91 else: ---> 92 super(ModelComponent, self).__setattr__(attr, val) 93 94 def _set_mvals(self, vals): ~/opt/miniconda3/envs/ska3test/lib/python3.8/site-packages/xija/component/heat.py in epoch(self, value) 232 Ps = self.parvals[0:self.n_pitches] 233 dPs = self.parvals[self.n_pitches:self.n_pitches + len(self.dP_pitches)] --> 234 dPs_interp = np.interpolate(x=self.P_pitches, xp=self.dP_pitches, fp=dPs) 235 236 Ps += dPs_interp * days / self.tau ~/opt/miniconda3/envs/ska3test/lib/python3.8/site-packages/numpy/__init__.py in __getattr__(attr) 301 return Tester 302 --> 303 raise AttributeError("module {!r} has no attribute " 304 "{!r}".format(__name__, attr)) 305 AttributeError: module 'numpy' has no attribute 'interpolate'
Updating the epoch for a model using the following code:
Results in the following error: