2
$\begingroup$

I have a rather big (around 400 MB) file written by the IDL (Interactive Data Language) software into its binary format ".SAV" which is a proprietary format, not the spss format expected by Mathematica for .sav files. I wish to process the data using Mathematica, not IDL (which I do not possess, by the way), but I have to read them beforehand. The only workaround I found to access the data, so far, is reading them into MATLAB (using the restore_idl function) but then I have still the problem of a space-effective way of converting this big chunk of data into a format readable by Mathematica.
I thank in advance for any suggestion Fabio

$\endgroup$
2
  • $\begingroup$ What is in the data? That might help deciding what format might be most effective to store it in transit. Would HDF5 format be a viable option? You could also take a look at this Listing of All Formats for inspiration. $\endgroup$
    – MarcoB
    Commented Jun 2, 2022 at 15:08
  • $\begingroup$ I'm not familiar with this format, but it seems Python's scipy can read this format. Either use python to convert it to a format Mathematica supports or use ExternalEvaluate directly. If it did work, please post your workflow as an answer, so future readers like you could use it. $\endgroup$
    – Ben Izd
    Commented Jun 2, 2022 at 15:43

1 Answer 1

2
$\begingroup$

Eventually I solved the problem using the same guidelines proposed by Ben Izd, but for the fact that used matlab rather than Python: first convert data from idl' s .sav to matlab's .mat file. Then, import the .mat file into Mathematica using the simple "Import" function. Thanks for the assistance.

$\endgroup$
2
  • 2
    $\begingroup$ Thanks for updating the status of your question. Can you please add some code and conversion details to this answer (perhaps for a much smaller but representative dataset)? Or can you convert your answer to a comment? $\endgroup$
    – Syed
    Commented Jun 3, 2022 at 11:43
  • $\begingroup$ Well, actually the procedure is just three-step: 1) Import data in matlab using the function "restore_idl" available at it.mathworks.com/matlabcentral/fileexchange/43899-restore_idl, 2) write the data in a standard matlab .mat file; 3) read the .mat file into Mathematica using Import[filename,{"MAT","Data"}] $\endgroup$ Commented Jun 3, 2022 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.