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

tplot_math.tinterp is adding the whole data structure to tplot_names() #119

Closed
ilgingell opened this issue Jun 2, 2020 · 1 comment
Closed

Comments

@ilgingell
Copy link

ilgingell commented Jun 2, 2020

Lines 35 and 42 both add new_tvar2 to the name attribute of the tplot variable with these two lines:

pytplot.data_quants[tvar2].name = new_tvar2
pytplot.data_quants[tvar1 + '_tinterp'].name = new_tvar2

but new_tvar2 is the whole structure with name, attributes, and the data quantities. So it ends up putting xarrays into the list of tplot_names which breaks a few other bits and pieces.

This seemed to fix it, though I don't know if its the best way:

pytplot.data_quants[tvar2].name = copy.deepcopy(new_tvar2.name)
pytplot.data_quants[tvar1 + '_tinterp'].name = copy.deepcopy(new_tvar2.name)
@MAVENSDC
Copy link
Collaborator

Thanks for catching that! The latest version should fix it.

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

No branches or pull requests

2 participants