fmihpc / analysator

Python based package for analyzing vlsv files produced by Vlasiator
GNU General Public License v2.0
5 stars 32 forks source link

SpatialGrid read_variable sorted output and associated issues #276

Open alhom opened 1 week ago

alhom commented 1 week ago

VlsvReader.read_variable, when called with cids=-1 (all CellIDs), returns data in the file layout, which can change between files. This keeps causing issues with users. Non-disruptive fixes to be done:

What should be the user-facing function? Likely read_interpolated_variable (0th order), or read_variable with coords parameter.

JonasSuni commented 1 week ago

https://stackoverflow.com/questions/3711184/how-to-use-inspect-to-get-the-callers-info-from-callee-in-python

This discussion describes how to get the info of the function that is calling the current function. This way you should be able to implement a warning that triggers when the user is calling read_variable but not when other analysator functions are calling it

alhom commented 4 days ago

Piecewise constant read_intepolated_variable in here: https://github.com/fmihpc/analysator/pull/278