Skip to content

Commit

Permalink
debugging..
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Sep 6, 2024
1 parent ab9a242 commit 0cad4a8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ def fit_model_to_spectrum(spectrum, component_list, expression,
initial_model = _build_model(component_list, expression)

if len(spectrum.shape) > 1:
print('initial model', initial_model)
print('spectrum unit', spectrum.unit)
return _fit_3D(initial_model, spectrum, window=window, n_cpu=n_cpu)
else:
return _fit_1D(initial_model, spectrum, run_fitter, window=window)
Expand Down Expand Up @@ -198,10 +196,7 @@ def collect_result(results):
window=window,
mask=spectrum.mask)
r = pool.apply_async(worker, callback=collect_result)

print(f'fitting spectrum.flux {spectrum.flux.unit} spectral_axis {spectrum.spectral_axis} initial model {initial_model}')
results.append(r)
print(f'result {r}')
for r in results:
r.wait()

Expand Down
4 changes: 0 additions & 4 deletions jdaviz/configs/default/plugins/model_fitting/model_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,6 @@ def create_model_component(self, model_component=None, model_component_label=Non
self._update_model_equation_default()

def _initialize_model_component(self, model_comp, comp_label, poly_order=None):
print(f'in initialize model component, model_comp={model_comp}, comp_label={comp_label}')

new_model = {"id": comp_label, "model_type": model_comp,
"parameters": [], "model_kwargs": {}}
model_cls = MODELS[model_comp]
Expand All @@ -471,7 +469,6 @@ def _initialize_model_component(self, model_comp, comp_label, poly_order=None):
default_param = getattr(model_cls, param_name, _EmptyParam(0))
default_units = self._param_units(param_name,
model_type=new_model["model_type"])
print(f'{param_name} default units', default_units)

if default_param.unit is None:
# then the model parameter accepts unitless, but we want
Expand Down Expand Up @@ -885,7 +882,6 @@ def _fit_model_to_spectrum(self, add_data):
return fitted_model, fitted_spectrum

def _fit_model_to_cube(self, add_data):
print('in fit model to cube')

if self._warn_if_no_equation():
return
Expand Down

0 comments on commit 0cad4a8

Please sign in to comment.