seppy 0.1.16__py3-none-any.whl → 0.1.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of seppy might be problematic. Click here for more details.

seppy/loader/wind.py CHANGED
@@ -180,6 +180,9 @@ def wind3dp_download(dataset, startdate, enddate, path=None, **kwargs):
180
180
  if not os.path.exists(f):
181
181
  # downloaded_file = Fido.fetch(result[0][i], path=path, max_conn=max_conn)
182
182
  downloaded_file = wind3dp_single_download(files[i], path=path)
183
+ if downloaded_file == []:
184
+ print('Trying download from CDAWeb...')
185
+ downloaded_file = Fido.fetch(result[0][i], path=path) #, max_conn=max_conn)
183
186
 
184
187
  except (RuntimeError, IndexError):
185
188
  print(f'Unable to obtain "{dataset}" data for {startdate}-{enddate}!')
@@ -279,22 +282,31 @@ def wind3dp_load(dataset, startdate, enddate, resample="1min", multi_index=True,
279
282
  metacdf = cdflib.CDF(path_to_metafile)
280
283
 
281
284
  e_mean = df.filter(like='ENERGY_').mean()
282
- # ∼30% ΔE/E => ΔE = 0.3*E
283
285
  # from Table 3 of Wilson et al. 2021, https://doi.org/10.1029/2020RG000714
284
- delta_e = 0.3 * e_mean
286
+ # ∼30% ΔE/E => ΔE = 0.3*E
287
+ if dataset in ['WI_SFSP_3DP', 'WI_SFPD_3DP', 'WI_SOSP_3DP', 'WI_SOPD_3DP']:
288
+ delta_e = 0.3 * e_mean
289
+ # ∼20% ΔE/E => ΔE = 0.2*E
290
+ elif dataset in ['WI_ELSP_3DP', 'WI_ELPD_3DP', 'WI_EHSP_3DP', 'WI_EHPD_3DP']:
291
+ delta_e = 0.2 * e_mean
285
292
  e_low = e_mean - delta_e
286
293
  e_high = e_mean + delta_e
287
294
  energies = pd.concat([e_mean, delta_e, e_low, e_high], axis=1, keys=['mean_E', 'DE', 'lower_E', 'upper_E'])
288
295
  energies['Bins_Text']= np.around(e_low/1e3, 2).astype('string') +' - '+ np.around(e_high/1e3, 2).astype('string') + ' keV'
289
296
 
290
297
  meta = {'channels_dict_df': energies,
291
- 'APPROX_ENERGY_LABELS': metacdf.varget('APPROX_ENERGY_LABELS'),
292
298
  'ENERGY_UNITS': metacdf.varattsget('ENERGY')['UNITS'],
293
299
  'FLUX_UNITS': metacdf.varattsget('FLUX')['UNITS'],
294
300
  'FLUX_FILLVAL': metacdf.varattsget('FLUX')['FILLVAL'],
295
- 'FLUX_LABELS': metacdf.varget('FLUX_ENERGY_LABL'),
296
301
  }
297
302
 
303
+ # for SFSP, SOSP, SFPD, SFSP:
304
+ try:
305
+ meta['APPROX_ENERGY_LABELS'] = metacdf.varget('APPROX_ENERGY_LABELS')
306
+ meta['FLUX_LABELS'] = metacdf.varget('FLUX_ENERGY_LABL')
307
+ except:
308
+ pass
309
+
298
310
  # create multi-index data frame of flux
299
311
  if multi_index:
300
312
  if dataset == 'WI_SFPD_3DP' or dataset == 'WI_SOPD_3DP':
seppy/version.py CHANGED
@@ -5,4 +5,4 @@ try:
5
5
  from setuptools_scm import get_version
6
6
  __version__ = get_version(root='..', relative_to=__file__)
7
7
  except Exception:
8
- __version__ = '0.1.16'
8
+ __version__ = '0.1.17'
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: seppy
3
- Version: 0.1.16
3
+ Version: 0.1.17
4
4
  Summary: SEPpy
5
5
  Home-page: https://github.com/serpentine-h2020/SEPpy
6
6
  Author: Jan Gieseler
@@ -33,13 +33,13 @@ Requires-Dist: requests
33
33
  Requires-Dist: solo-epd-loader
34
34
  Requires-Dist: sunpy>=4.1.0
35
35
  Provides-Extra: all
36
- Provides-Extra: docs
37
- Requires-Dist: sphinx; extra == "docs"
38
- Requires-Dist: sphinx-automodapi; extra == "docs"
39
36
  Provides-Extra: test
40
37
  Requires-Dist: pytest; extra == "test"
41
38
  Requires-Dist: pytest-doctestplus; extra == "test"
42
39
  Requires-Dist: pytest-cov; extra == "test"
40
+ Provides-Extra: docs
41
+ Requires-Dist: sphinx; extra == "docs"
42
+ Requires-Dist: sphinx-automodapi; extra == "docs"
43
43
 
44
44
  seppy
45
45
  =====
@@ -51,7 +51,7 @@ seppy
51
51
  .. |python version| image:: https://img.shields.io/pypi/pyversions/seppy?style=flat&logo=python
52
52
  .. |zenodo doi| image:: https://zenodo.org/badge/451799504.svg
53
53
  :target: https://zenodo.org/badge/latestdoi/451799504
54
- .. |pytest| image:: https://github.com/serpentine-h2020/SEPpy/workflows/pytest/badge.svg
54
+ .. |pytest| image:: https://github.com/serpentine-h2020/SEPpy/actions/workflows/pytest.yml/badge.svg?branch=main
55
55
  .. |codecov| image:: https://codecov.io/gh/serpentine-h2020/SEPpy/branch/main/graph/badge.svg?token=FYELM4Y7DF
56
56
  :target: https://codecov.io/gh/serpentine-h2020/SEPpy
57
57
 
@@ -1,5 +1,5 @@
1
1
  seppy/__init__.py,sha256=M8ZBbGj0r_XdNVLzaSXF38M4wyzAgUX32LXcSYh5O5A,254
2
- seppy/version.py,sha256=vSeLQvdsXCv8Lj-8Fx74r8zYls2TOcJPROuO3_uzEmg,346
2
+ seppy/version.py,sha256=ZfyBAus4lEppBW04TYAwcehqpK2ZB149Kdo9PHYeWVg,346
3
3
  seppy/data/test/20230719_side0.csv,sha256=0htTQcdQydRc92bkO26lxK8tDRSeN6uov13VfsqmUFQ,72368
4
4
  seppy/data/test/20230719_side1.csv,sha256=iHCfHmOIltJatncWpns_zq3ym_-2yRu0twmDvQDbmJw,72368
5
5
  seppy/data/test/20230719_side2.csv,sha256=eYyEQX5fNDO4E57KwKN3bHs6u5-lHaAhIHt-3f20Urg,72368
@@ -14,7 +14,7 @@ seppy/loader/psp.py,sha256=PbxCEW-06d2I_JGIfIAqqXMU_uPdQFhmh-fUoXpzz9k,31535
14
14
  seppy/loader/soho.py,sha256=EIFKde1dGpT9yU6bU-XtTsHUCvTEkzHhdPOOMtqVrDU,20262
15
15
  seppy/loader/solo.py,sha256=Nst2ZJU2yH5NHsB6M_69ryVfzt978hbmqhxaHZJREVg,3054
16
16
  seppy/loader/stereo.py,sha256=S0_IRIFbFxLH00bSIt1uZMflmuG5dAU5sKw0w9NL9oM,24583
17
- seppy/loader/wind.py,sha256=3rWV_EOcY7sY69eqtCQCZxL5GxAQZuMm1-wpJJxrej8,18460
17
+ seppy/loader/wind.py,sha256=44zqFJsNn2fyLDi5SLkqTQO5iGCdVk5a8p7s28VVw6Y,18995
18
18
  seppy/tests/__init__.py,sha256=1D-l3TVbwIZHY78A-sB7kc4ldldX8ZaEq-Ntph51WVw,108
19
19
  seppy/tests/test_loader.py,sha256=mt52vrAeSEtJ-od4Cqt0HrscN_ykKNHklGZm8OTZjLs,7767
20
20
  seppy/tests/test_tools.py,sha256=LQPekw-ddse88OYu-LWChFcJPT2SwGS7uEG1tKRLVok,31539
@@ -22,8 +22,8 @@ seppy/tools/__init__.py,sha256=Ge3lQ9zVRJ27aaHSet2I1wQ9tD4emVfjnn49pUGcoiY,11608
22
22
  seppy/tools/swaves.py,sha256=OcohPXLko0ik9FLyYMVkYxI75W4XzOKvQ2Ylnwi-wlQ,3139
23
23
  seppy/tools/widgets.py,sha256=atQj9vvus0UgrUV6vlPcTdjpaidnERUevOp6FUmGLSI,6820
24
24
  seppy/util/__init__.py,sha256=RMMeH37L75wwQPHb_-_-2Rk7lzlDtBC2K6lkWKtxAMg,15253
25
- seppy-0.1.16.dist-info/LICENSE.rst,sha256=SxptLPCIHKdfDjyguGdC7ai6Eze-Vz_t1jdqC8h19js,1473
26
- seppy-0.1.16.dist-info/METADATA,sha256=76lm6wNfS6rHjDAU6OYxgZQVfRvQbex2lrxpXtxwK3A,4374
27
- seppy-0.1.16.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
28
- seppy-0.1.16.dist-info/top_level.txt,sha256=G2Op1GREPmbCX81isNhYY_7ZZyLWLIm-MJC04J4Fgc4,6
29
- seppy-0.1.16.dist-info/RECORD,,
25
+ seppy-0.1.17.dist-info/LICENSE.rst,sha256=SxptLPCIHKdfDjyguGdC7ai6Eze-Vz_t1jdqC8h19js,1473
26
+ seppy-0.1.17.dist-info/METADATA,sha256=zEKt2cdJMiv7iEUN_cuk8K24xvPOlHsirjA0n70h1ns,4398
27
+ seppy-0.1.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
28
+ seppy-0.1.17.dist-info/top_level.txt,sha256=G2Op1GREPmbCX81isNhYY_7ZZyLWLIm-MJC04J4Fgc4,6
29
+ seppy-0.1.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.0.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5