Skip to content

Commit

Permalink
add support for dtB movie files
Browse files Browse the repository at this point in the history
  • Loading branch information
tgastine committed Sep 11, 2024
1 parent 6355886 commit a926977
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/magic/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(self, file=None, iplot=True, nstep=1, png=False,
# Read the movie file
infile = npfile(filename, endian='B')
# Header
version = infile.fort_read('|S64')
version = infile.fort_read('|S64')[0].decode()
n_type, n_surface, const, n_fields = infile.fort_read(precision)
movtype = infile.fort_read(precision)
self.n_fields = int(n_fields)
Expand Down Expand Up @@ -280,7 +280,7 @@ def __init__(self, file=None, iplot=True, nstep=1, png=False,
if self.movtype in [1, 2, 3, 14]: # read inner core
shape = (self.n_theta_max, 2*(n_r_mov_tot+2))
self.n_theta_plot = 2*self.n_theta_max
elif self.movtype in [8, 9]:
elif self.movtype in [8, 9, 20, 21, 22, 23, 24, 25, 26]:
shape = (self.n_theta_max, n_r_mov_tot+2)
self.n_theta_plot = self.n_theta_max
elif self.movtype in [4, 5, 6, 7, 15, 16, 17, 18, 47, 54,
Expand Down Expand Up @@ -339,7 +339,7 @@ def __init__(self, file=None, iplot=True, nstep=1, png=False,
datic1 = dat[:, 2*self.n_r_max+self.n_r_ic_max+2:]
self.data[ll, k, ...] = np.vstack((datoc0, datoc1))
self.data_ic[ll, k, ...] = np.vstack((datic0, datic1))
elif self.movtype in [8, 9]:
elif self.movtype in [8, 9, 20, 21, 22, 23, 24, 25, 26]:
self.data_ic[ll, k, ...] = dat[:, self.n_r_max:]
self.data[ll, k, ...] = dat[:, :self.n_r_max]
elif self.movtype in [4, 5, 6, 7, 15, 16, 17, 18, 47, 54, 91,
Expand Down

0 comments on commit a926977

Please sign in to comment.