fmihpc / analysator

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

pt.grid.MayaviGrid IndexError: list index out of range #155

Closed 44444444444444441ffff closed 2 years ago

44444444444444441ffff commented 2 years ago

In [1]: import pytools as pt
Using LaTeX formatting /home/jing_yi/software/analysator-master/pyCalculations/fieldtracer.py:61: SyntaxWarning: "is not" with a literal. Did you mean "!="? if(bvar is not 'B'): Note: Unable to switch to TkAgg backend Using matplotlib version 3.1.2

In [2]: f=pt.vlsvfile.VlsvReader('/home/jing_yi/software/corsair1/state00002400.vlsv')

In [3]: ns = f.read_variable('n_H+sw_ave')

In [4]: grid = pt.grid.MayaviGrid(f,'ns')

IndexError Traceback (most recent call last)

in ----> 1 grid = pt.grid.MayaviGrid(f,'ns') ~/software/analysator-master/pyMayaVi/mayavigrid.py in __init__(self, vlsvReader, variable, operator, threaded, **traits) 156 self.__unstructured_figures = [] 157 self.__thread = [] --> 158 self.__load_grid( variable=variable, operator=operator, threaded=threaded ) 159 self.values = [] 160 self.variable_plotted = variable ~/software/analysator-master/pyMayaVi/mayavigrid.py in __load_grid(self, variable, operator, threaded) 239 ''' 240 # Get the cell params: --> 241 mins = np.array([self.vlsvReader.read_parameter("xmin"), self.vlsvReader.read_parameter("ymin"), self.vlsvReader.read_parameter("zmin")]) 242 cells = np.array([self.vlsvReader.read_parameter("xcells_ini"), self.vlsvReader.read_parameter("ycells_ini"), self.vlsvReader.read_parameter("zcells_ini")]) 243 maxs = np.array([self.vlsvReader.read_parameter("xmax"), self.vlsvReader.read_parameter("ymax"), self.vlsvReader.read_parameter("zmax")]) ~/software/analysator-master/pyVlsv/vlsvreader.py in read_parameter(self, name) 1621 return self.read(name="time", tag="PARAMETER") 1622 -> 1623 return self.read(name=name, tag="PARAMETER") 1624 1625 ~/software/analysator-master/pyVlsv/vlsvreader.py in read(self, name, tag, mesh, operator, cellids) 672 673 # If this is a variable that can be summed over the populations (Ex. rho, PTensorDiagonal, ...) --> 674 if self.check_variable(self.active_populations[0]+'/'+name): 675 tmp_vars = [] 676 for pname in self.active_populations: IndexError: list index out of range
markusbattarbee commented 2 years ago

Hi, Analysator is not designed for plotting Corsair data (even though Corsair uses the same file format). Analysator is only for plotting Vlasiator data. Also, the MayaVi2 plotting tools (pt.grid.*) are no longer supported.

44444444444444441ffff commented 2 years ago

Thank you very much! It's so kind of you to remind me this! I just start to use your excellent code for scientific research. Please give me some valuable advice to handle the corsair data! Thank you for your time again!

At 2021-08-31 14:00:23, "Markus Battarbee" @.***> wrote:

Hi, Analysator is not designed for plotting Corsair data (even though Corsair uses the same file format). Analysator is only for plotting Vlasiator data. Also, the MayaVi2 plotting tools (pt.grid.*) are no longer supported.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

44444444444444441ffff commented 2 years ago

Thank you very much! It's so kind of you to remind me this! I just start to use your excellent code for scientific research. Please give me some valuable advice to handle the corsair data! Thank you for your time again!

At 2021-08-31 14:00:23, "Markus Battarbee" @.***> wrote:

Hi, Analysator is not designed for plotting Corsair data (even though Corsair uses the same file format). Analysator is only for plotting Vlasiator data. Also, the MayaVi2 plotting tools (pt.grid.*) are no longer supported.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

markusbattarbee commented 2 years ago

Hi, please post any questions about Corsair in the Corsair repository or directly to the people who have contributed to Corsair - it is not supported by Analysator. Mind you, Corsair is apparently not under active development, so you might be on your own.