Prechádzať zdrojové kódy

remove deprecated memmap from StateRecorder

vogdb 5 rokov pred
rodič
commit
7209bc7792
1 zmenil súbory, kde vykonal 0 pridanie a 16 odobranie
  1. 0 16
      epileptor/state_recorder.py

+ 0 - 16
epileptor/state_recorder.py

@@ -22,22 +22,6 @@ class StateRecorder:
         y_nh, x_nh = self._used_params['y_nh'], self._used_params['x_nh']
         self._plain_dict[name] = np.zeros((self._nt, y_nh, x_nh), dtype=np.float32)
 
-    # deprecated
-    def _init_plain_memmap(self, plain_states):
-        fname = '{}_plain.dat'.format(self.generate_filename())
-        p = self._used_params
-        nt = int(p['t_end'] / p['dt'])
-        dtype = [(state, np.float32, (p['y_nh'], p['x_nh'])) for state in plain_states]
-        dtype.append(('names', np.str, len(plain_states)))
-        self._plain_dict = np.memmap(fname, dtype=dtype, shape=nt, mode='write')
-        self._plain_dict['names'][:] = plain_states
-        # del self._plain_dict
-        # np.memmap(memmap_fn, dtype=arr_type, shape=nt, mode='r')
-
-    # deprecated
-    def record_plain_memmap(self, name, val, ti):
-        self._plain_dict[name][ti] = val.astype(np.float32)
-
     def record_points(self, dt_i, K, Na, INaKpump, V, U, xD, uu, nu, phi):
         for name, value in list(locals().items()):
             if not any((value is self, value is dt_i)):