Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Both of these work with arrays of maximum 2 dimensions. And only one array per file.

saving to .mat file (MatLab)

Code Block
import scipy.io 

N_array = np.arange(0,100)
x_array = np.random(100)
y_array = np.random(100)
scipy.io.savemat( "output_file_name.mat", mdict={'N': N_array, 'x' : x_array, 'y' : y_array } )

saving to HDF5 file

Code Block
none
none

import h5py

ofile = h5py.File(self.outputfile,'w')
group = ofile.create_group("MyGroup")
group.create_dataset('delaytime',data=np.array(self.h_delaytime))
group.create_dataset('rawsignal',data=np.array(self.h_ipm_rsig))
group.create_dataset('normsignal',data=np.array(self.h_ipm_nsig))
ofile.close()

Interactive analysis with IPython

...