Open alhom opened 1 week ago
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
Piecewise constant read_intepolated_variable in here: https://github.com/fmihpc/analysator/pull/278
VlsvReader.read_variable
, when called withcids=-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:investigate if we can warn when using
read_variable
from outside analysator vs. from within analysator -> warning to remind about sorting.__name__
doesn't really work though.Pass coordinates to read_variable -> use 0th-order read_interpolated_variable instead
:heavy_check_mark: read_interpolated_variable to have a 0th-order interp.
read_variable_info to maybe sort by default? Returns VariableInfo. It is not a drop-in replacement for numpy ndarray, which is a bit unfortunate. Likely useful in any case, and non-disruptive (as long as sorting it doesn't break anything...)
What should be the user-facing function? Likely read_interpolated_variable (0th order), or read_variable with coords parameter.