SciQLop / speasy

Space Physics made EASY! A simple Python package to deal with main Space Physics WebServices (CDA,SSC,AMDA,..)
Other
24 stars 7 forks source link

[AMDA] Uses CDF_ISTP as default #101

Closed jeandet closed 8 months ago

jeandet commented 9 months ago

@brenard-irap the CI issue looks legit, with CDF output format it looks like I get a single column name for a 2 columns variable:

In [1]: from speasy import amda

In [2]: first_param_index=amda.list_parameters()[0]

In [3]: print(first_param_index)
<ParameterIndex: He flux>

In [4]: first_param=amda.get_parameter(first_param_index, "2018-01-01", "2018-01-02T01")

In [5]: first_param
Out[5]: <speasy.products.variable.SpeasyVariable at 0x7f894d4698c0>

In [6]: first_param.columns
Out[6]: ['He flux']

In [7]: first_param.values
Out[7]: 
array([[0.12428   , 0.        ],
...

Looks like an issue on ADMA side?

brenard-irap commented 8 months ago

For a spectrogram, we don't need to define a label for each data component...

I think you have the same problem with this CDAWeb parameter

>>> import speasy as spz
>>> mms1_dis_energyspectr_omni_fast = spz.get_data(
...     spz.inventories.tree.cda.MMS.MMS1.DIS.MMS1_FPI_FAST_L2_DIS_MOMS.mms1_dis_energyspectr_omni_fast, "2019-01-02T15:30",
...     "2019-01-02T20")
>>> mms1_dis_energyspectr_omni_fast.columns
['DEF_omni']
>>> mms1_dis_energyspectr_omni_fast.values
array([[  88873.6015625 ,   52076.25390625,   67580.1484375 , ...,
         952113.375     , 1113830.75      , 1006203.8125    ],
       [  67058.828125  ,   34980.6015625 ,   45100.02734375, ...,
         971669.5625    , 1124289.375     , 1000310.0625    ],
       [  65529.484375  ,   54712.4765625 ,   49212.6015625 , ...,
         976081.75      , 1111816.125     , 1066082.375     ],
       ...,
       [  24619.7265625 ,       0.        ,       0.        , ...,
         478687.3125    ,  199476.578125  ,  101960.5078125 ],
       [      0.        ,       0.        ,    1759.7244873 , ...,
         523574.90625   ,  278838.625     ,   79713.8203125 ],
       [      0.        ,       0.        ,   14445.49511719, ...,
         410759.90625   ,  193136.21875   ,   81875.1953125 ]])
jeandet commented 8 months ago

@brenard-irap my bad I overlooked, since there was only two columns I thought that is was a simple timeserie.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (476008b) 86.50% compared to head (8bc4b4f) 86.43%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #101 +/- ## ========================================== - Coverage 86.50% 86.43% -0.07% ========================================== Files 51 51 Lines 3045 3045 Branches 490 490 ========================================== - Hits 2634 2632 -2 - Misses 275 276 +1 - Partials 136 137 +1 ``` | [Flag](https://app.codecov.io/gh/SciQLop/speasy/pull/101/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/SciQLop/speasy/pull/101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop) | `85.77% <ø> (-0.69%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/SciQLop/speasy/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop) | Coverage Δ | | |---|---|---| | [speasy/config/\_\_init\_\_.py](https://app.codecov.io/gh/SciQLop/speasy/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop#diff-c3BlYXN5L2NvbmZpZy9fX2luaXRfXy5weQ==) | `95.58% <ø> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/SciQLop/speasy/pull/101/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.