Skip to content
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

RC v0.0.4 #52

Merged
merged 282 commits into from
Jun 11, 2021
Merged

RC v0.0.4 #52

merged 282 commits into from
Jun 11, 2021

Conversation

aburrell
Copy link
Member

@aburrell aburrell commented Jun 2, 2021

Release candidate for version 0.0.4:

jklenzing and others added 30 commits August 28, 2019 14:26
metadata and netcdf intersection improvements
…oords

Maintain history of coords files whilst merging
Fixed downstream use of `coords` to use local coordinate routine.  Also fixed
import order.
TST: Update for latest pysat testing updates
aburrell and others added 3 commits June 2, 2021 09:06
Replaced remaining instance of `Notes` with `Note`.
Added requirements file for docs.
@aburrell aburrell added this to the 0.0.4 Release milestone Jun 2, 2021
Copy link
Collaborator

@rstoneback rstoneback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a visual pass through the code. Planning at poking at the instruments as well.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pysatMadrigal/instruments/templates/madrigal_pandas.py Outdated Show resolved Hide resolved
pysatMadrigal/instruments/templates/madrigal_pandas.py Outdated Show resolved Hide resolved
pysatMadrigal/instruments/templates/madrigal_pandas.py Outdated Show resolved Hide resolved
pysatMadrigal/instruments/templates/madrigal_pandas.py Outdated Show resolved Hide resolved
docs/examples/ex_init.rst Outdated Show resolved Hide resolved
aburrell and others added 3 commits June 2, 2021 12:47
Fixed wrong module name and other issues in the documentation.

Co-authored-by: Russell Stoneback <rstoneba@utdallas.edu>
Updated the style of the block comments.

Co-authored-by: Russell Stoneback <rstoneba@utdallas.edu>
Fixed the formatting for inline and block comments.

Co-authored-by: Russell Stoneback <rstoneba@utdallas.edu>
@aburrell aburrell requested a review from rstoneback June 2, 2021 16:59
@rstoneback
Copy link
Collaborator

I did some extra checks with DMSP. I have an admixture of hdf and 'simple' files. When loading all of the data at once, the data from the simple file ends up at the end rather than in time order. strict_time_flag=False here.

In [28]: dmsp.files.files                                                                                                                                                 
Out[28]: 
2011-08-15         dms_ut_20110815_15.002.hdf5
2011-08-16         dms_ut_20110816_15.002.hdf5
2011-08-17         dms_ut_20110817_15.002.hdf5
2011-08-18    dms_ut_20110818_15.002.simple.gz
2012-05-13         dms_ut_20120513_15.002.hdf5
2012-05-14         dms_ut_20120514_15.002.hdf5
2012-05-15         dms_ut_20120515_15.002.hdf5
2012-05-16         dms_ut_20120516_15.002.hdf5
2012-05-17         dms_ut_20120517_15.002.hdf5
dtype: object

In [29]: dmsp.load()                                                                                                                                                      
/Users/russellstoneback/opt/anaconda3/envs/standard3/bin/ipython:1: UserWarning:  Loaded data is not monotonically increasing. 
  #!/Users/russellstoneback/opt/anaconda3/envs/standard3/bin/python

In [30]: dmsp.index.is_monotonic_increasing                                                                                                                               
Out[30]: False

Added `sort=True` to the general load command.
Copy link
Collaborator

@rstoneback rstoneback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified the output from the first suggested change for DMSP.
Note the duplicate filenames arises since I have both 'simple' and regular files for a few common days.

In [1]: import pysat                                                                                                                                                      

In [2]: dmsp = pysat.Instrument('dmsp', 'ivm', tag='utd', inst_id='f15')                                                                                                  
pysat WARNING: Duplicate datetimes in stored filename information.
Keeping one of each of the duplicates, dropping the rest. Please ensure the file datetimes are unique at the microsecond level.
pysat WARNING: DatetimeIndex(['2011-08-16', '2011-08-17'], dtype='datetime64[ns]', freq=None)

In [3]: dmsp.load()                                                                                                                                                       
First sort

In [4]: dmsp.data                                                                                                                                                         
Out[4]: 
                       year  month   day  hour   min   sec    recno   kindat   kinst  ...  phe+   ph+      ti      te  rpa_flag_ut  idm_flag_ut  rms_x  sigma_vy  sigma_vz
2011-08-15 00:22:03  2011.0    8.0  15.0   0.0  22.0   3.0    330.0  10245.0  8100.0  ...  0.02  0.08  1577.0  2000.0          1.0          1.0   0.03      21.6      31.5

Trying to check out GNSS with mixed files and I'm getting an error. Trying to load an hdf and netcdf file over a two day span.

In [21]: gnss.load(date=dt.datetime(2017, 11, 17), end_date=dt.datetime(2017, 11, 19))                                                                                    
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)

AssertionError: 3 columns passed, passed data had 16 columns

pysatMadrigal/instruments/methods/general.py Outdated Show resolved Hide resolved
pysatMadrigal/instruments/methods/general.py Outdated Show resolved Hide resolved
@rstoneback
Copy link
Collaborator

I got the same error independent of file type order.

CODE_OF_CONDUCT.md Outdated Show resolved Hide resolved
CODE_OF_CONDUCT.md Outdated Show resolved Hide resolved
pysatMadrigal/instruments/gnss_tec.py Outdated Show resolved Hide resolved
pysatMadrigal/instruments/methods/gnss.py Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Updated various docs and comments as suggested in the code review.

Co-authored-by: Jeff Klenzing <jklenzing@gmail.com>
CONTRIBUTING.md Outdated Show resolved Hide resolved
Fixed the loading sort call, and a potential line length issue.

Co-authored-by: Russell Stoneback <rstoneba@utdallas.edu>
The length of the `labels` could change from netCDF4 and other file types.  Fixed by reserving the labels list for non-netCDF4 file types and just checking to see whether the metadata is defined or not before updating it.
@rstoneback
Copy link
Collaborator

I checked out the loading with mixed hdf and netcdf and it works for all tested order variants. I must've done something wrong pulling down the latest code when I last checked a few days ago. Sorry about that.

Copy link
Member

@jklenzing jklenzing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor documentation update

pysatMadrigal/instruments/gnss_tec.py Outdated Show resolved Hide resolved
Fixed import for datetime to use correct nickname.

Co-authored-by: Jeff Klenzing <jklenzing@gmail.com>
@aburrell aburrell merged commit 8fce06b into main Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants