-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Cubeviz metadata viewer #1325
Merged
+460
−169
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
25566ee
ENH: Cubeviz metadata viewer
pllim 0ea9c8c
DOC: Add doc for Cubeviz metadata viewer
pllim 6236cc9
Separate out primary header metadata.
pllim 7433fa3
Add metadata viewer tests
pllim d8f0977
Test metadata loading in all the viz
pllim 17f542c
Inherit FITS header comment cards.
pllim 07270be
Do not set traitlet until the end
pllim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Test metadata loading in all the viz
- v4.1.dev
- v4.0.0
- v3.11.dev
- v3.10.4
- v3.10.3
- v3.10.2
- v3.10.1
- v3.10.0
- v3.10.dev
- v3.9.1
- v3.9.0
- v3.8.2
- v3.8.1
- v3.8.0
- v3.8.dev
- v3.7.1
- v3.7.0
- v3.7.dev
- v3.6.2
- v3.6.1
- v3.6.0
- v3.6.dev
- v3.5.0
- v3.4.0
- v3.4.dev
- v3.3.1
- v3.3.0
- v3.2.1
- v3.2.0
- v3.2.dev
- v3.1.2
- v3.1.1
- v3.1.0
- v3.1.dev
- v3.0.2
- v3.0.1
- v3.0.0
- v2.10.0
- v2.9.0
- v2.8.0
- v2.7.1
- v2.7.0
- v2.7.0.post1
- v2.6.0
commit d8f0977a4c9b94ef03743f9f5908cbf579ae36f9
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
from asdf.asdf import AsdfWarning | ||
from astropy.utils.data import download_file | ||
|
||
from jdaviz.utils import PRIHDR_KEY | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_2d_parser(specviz2d_helper): | ||
fn = download_file('https://stsci.box.com/shared/static/exnkul627fcuhy5akf2gswytud5tazmw.fits', cache=True) # noqa | ||
|
||
with pytest.warns(AsdfWarning, match='jwextension'): | ||
specviz2d_helper.load_data(spectrum_2d=fn) | ||
assert len(specviz2d_helper.app.data_collection) == 2 | ||
|
||
dc_0 = specviz2d_helper.app.data_collection[0] | ||
assert dc_0.label == 'Spectrum 2D' | ||
assert PRIHDR_KEY not in dc_0.meta | ||
assert 'header' not in dc_0.meta | ||
assert dc_0.meta['DETECTOR'] == 'MIRIMAGE' | ||
|
||
dc_1 = specviz2d_helper.app.data_collection[1] | ||
assert dc_1.label == 'Spectrum 1D' | ||
assert 'header' not in dc_1.meta | ||
assert dc_1.meta['NAXIS'] == 2 | ||
|
||
|
||
def test_1d_parser(specviz2d_helper, spectrum1d): | ||
specviz2d_helper.load_data(spectrum_1d=spectrum1d) | ||
assert len(specviz2d_helper.app.data_collection) == 1 | ||
dc_0 = specviz2d_helper.app.data_collection[0] | ||
assert dc_0.label == 'Spectrum 1D' | ||
assert dc_0.meta['uncertainty_type'] == 'std' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
import os | ||
from ipyvue import watch | ||
|
||
|
||
__all__ = [] | ||
|
||
# For Metadata Viewer plugin internal use only. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception class changed because it now crashes in metadata parsing. I don't think it matters?