Skip to content

[Bug] SED fitting task fails with "No valid data to fit" #366

@manning-ncsa

Description

@manning-ncsa

🐞 Bug Report

Describe the bug

Some SED fitting tasks are failing with error:

AssertionError('No valid data to fit: check the sign of the masks.')

where the line line triggering the error from the trace below is here.

Trace:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 479, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 779, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/host/transient_tasks.py", line 1664, in local_host_sed_fitting
    LocalHostSEDFitting(transient_name).run_process()
  File "/app/host/transient_tasks.py", line 263, in run_process
    status_message = self._run_process(transient)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/host/transient_tasks.py", line 1203, in _run_process
    status_message = super()._run_process(
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/app/host/transient_tasks.py", line 1082, in _run_process
    observations = build_obs(transient, aperture_type)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/host/prospector.py", line 196, in build_obs
    return fix_obs(obs_data)
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prospect/utils/obsutils.py", line 80, in fix_obs
    assert obs["ndof"] > 0, "No valid data to fit: check the sign of the masks."
           ^^^^^^^^^^^^^^^
AssertionError: No valid data to fit: check the sign of the masks.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions