astrodbtoolkit / astrodbtoolkit/astrodb-template-db

Test for spectra errors

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
tests
Dominant language
Python
Stars
3
Forks
5
Avg merge
34m
Merged PRs (30d)
2

Description

```Python
def test_check_spectrum_wave_units_errors(t_spectrum):
t_spectrum.spectral_axis = t_spectrum.spectral_axis * u.m # Set incorrect units
with pytest.raises(AstroDBError) as error_message:
check_spectrum_units(t_spectrum, raise_error=True)

assert "Unable to convert spectral axis to microns" in str(error_message)

def test_check_spectrum_flux_units_errors(t_spectrum):
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate check_spectrum_units and the existing tests that cover spectral-axis unit errors. Use the shown wave-unit test as the starting point, determine the corresponding flux-unit error case, and run the relevant pytest tests to confirm both error paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.