Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BUG: Fix typo in cubeviz parser docstring, remove duplicate code #539

Merged
merged 2 commits into from
Apr 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions jdaviz/configs/cubeviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def parse_data(app, file_obj, data_type=None, data_label=None):
data_type : str, {'flux', 'mask', 'uncert'}
The data type used to explicitly differentiate parsed data.
data_label : str, optional
The label applicad to the glue data component.
The label to be applied to the Glue data component.
"""
if data_type is not None and data_type.lower() not in ['flux', 'mask', 'uncert']:
msg = "Data type must be one of 'flux', 'mask', or 'uncertainty'."
Expand All @@ -49,7 +49,6 @@ def parse_data(app, file_obj, data_type=None, data_label=None):
file_name = os.path.basename(file_obj)

with fits.open(file_obj) as hdulist:
hdulist = fits.open(file_obj)
_parse_hdu(app, hdulist, file_name=data_label or file_name)

# If the data types are custom data objects, use explicit parsers. Note
Expand Down