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

Unintuitive varnames functionality for loading data #968

Open
bpwrs opened this issue Aug 8, 2024 · 0 comments
Open

Unintuitive varnames functionality for loading data #968

bpwrs opened this issue Aug 8, 2024 · 0 comments
Labels
cdflib Issues involving the cdflib package Documentation Examples, notebooks, installation guides, webinars, etc onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve

Comments

@bpwrs
Copy link

bpwrs commented Aug 8, 2024

This may be a bit of an abstract issue but I feel it is worth putting here. One thing I've noticed is the rather unintuitive definition and use of the varnames keyword when loading data. When loading any data using pyspedas the varnames keyword ultimately gets passed to cdf_to_tplot.py where it loads only the varnames matching those names included in the cdf file. The confusion arises in the distinction between the variables included in the cdf and the secondary variables generated internally from pyspedas (i.e. spin averaged, omnidirectional and other type of post processing).

On the user side, the functioning of the varnames keyword requires some knowledge of what variables are available natively from the cdf file and what is generated internally within pyspedas. In my mind this is counterintuitive as to the prime usefulness of pyspedas, as in normal use (no passing of varnames) and in the documentation there is no distinction between the native cdf variables and the secondary variables generated internally by pyspedas. They are all loaded as tplot variables and treated as the same and someone is not normally required to know what variables are generated internally from pyspedas.

For example of where this might be an issue, say someone gives a name of a spin averaged value to a load function implying that they only want to load that one tplot variable (pyspedas runs much fasted when limiting the loaded variables, especially for longer time windows). When that varname is passed to cdf_to_tplot.py because it does not exist in the cdf and therefore no tplot variable is returned.

Perhaps this keyword could be clarified in the documentation to make its use more clear to readers. Also, In my mind a useful addition would be to include the ability for users to use varnames to load a pyspedas created tplot variable. Although that does require quite a hefty change to the functioning of the keyword.

@jameswilburlewis jameswilburlewis added Documentation Examples, notebooks, installation guides, webinars, etc onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve cdflib Issues involving the cdflib package labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cdflib Issues involving the cdflib package Documentation Examples, notebooks, installation guides, webinars, etc onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve
Projects
None yet
Development

No branches or pull requests

2 participants