Skip to content

Commit

Permalink
Merge pull request #162 from pysat/bug/labels
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Apr 10, 2023
2 parents b0003c1 + cfc24a5 commit d0a8a84
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Updated dosctring style for consistency
* Removed version cap for xarray
* Added manual workflow to check that latest RC is installable through test pip
* Update meta label type for instruments

## [0.0.4] - 2022-11-07
* Update instrument tests with new test class
Expand Down
5 changes: 3 additions & 2 deletions pysatNASA/instruments/icon_euv.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
"""
labels = {'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', float),
'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)}
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))}

meta_translation = {'FieldNam': 'plot'}

Expand Down
5 changes: 3 additions & 2 deletions pysatNASA/instruments/icon_fuv.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
"""
labels = {'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', float),
'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)}
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))}

meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis',
'FIELDNAM': 'plot', 'LABLAXIS': 'axis',
Expand Down
5 changes: 3 additions & 2 deletions pysatNASA/instruments/icon_ivm.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):

labels = {'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', float),
'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)}
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))}

meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis',
'ScaleTyp': 'scale',
Expand Down
5 changes: 3 additions & 2 deletions pysatNASA/instruments/icon_mighti.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
"""
labels = {'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', float),
'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)}
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))}

meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis',
'FIELDNAM': 'plot', 'LABLAXIS': 'axis',
Expand Down
12 changes: 6 additions & 6 deletions pysatNASA/instruments/methods/_cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ def load_variables(self):
def to_pysat(self, flatten_twod=True,
labels={'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', float),
'max_val': ('ValidMax', float),
'fill_val': ('FillVal', float)}):
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))}):
"""Export loaded CDF data into data, meta for pysat module.
Parameters
Expand All @@ -382,9 +382,9 @@ def to_pysat(self, flatten_twod=True,
that order.
(default={'units': ('units', str), 'name': ('long_name', str),
'notes': ('notes', str), 'desc': ('desc', str),
'min_val': ('value_min', float),
'max_val': ('value_max', float)
'fill_val': ('fill', float)})
'min_val': ('value_min', (int, float)),
'max_val': ('value_max', (int, float))
'fill_val': ('fill', (int, float))})
Returns
-------
Expand Down

0 comments on commit d0a8a84

Please sign in to comment.