Skip to content

Commit

Permalink
more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samaloney committed Oct 31, 2024
1 parent 36e563b commit f9c7219
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/fitting_simulated_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
srm_model = MatrixModel(
matrix=srm, input_axis=SpectralAxis(ph_energies), output_axis=SpectralAxis(ph_energies), c=1 * u.ct / u.ph
)
srm_model.inputs_units = {"x": u.ph}
srm_model.input_units = {"x": u.ph}

with quantity_support():
plt.figure()
Expand Down
5 changes: 3 additions & 2 deletions sunkit_spex/models/instrument_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class MatrixModel(Fittable1DModel):
c = Parameter(fixed=True)

def __init__(self, matrix, input_axis, output_axis, c):
self._input_units = None
self.inputs_axis = input_axis
self.output_axis = output_axis
self.matrix = matrix
Expand All @@ -22,11 +23,11 @@ def evaluate(self, x, c):

@property
def input_units(self):
return self.inputs_units
return self._input_units

@input_units.setter
def input_units(self, units):
self.inputs_units = units
self._input_units = units

@staticmethod
def _parameter_units_for_data_units(inputs_unit, outputs_unit):
Expand Down

0 comments on commit f9c7219

Please sign in to comment.