[prev in list] [next in list] [prev in thread] [next in thread] 

List:       scilab-users
Subject:    Re: [Scilab-users] read a "save()" file in Python
From:       GOBILLOT Gilles 116128 <gilles.gobillot () cea ! fr>
Date:       2014-07-21 12:24:09
Message-ID: 59863E6B3B5B7245A7B5660A00E8C8991B26E874 () EXDAG0-A0 ! intra ! cea ! fr
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Calixte

Tanks for this answer.

In fact HDF5 is used in recents Scilab's versions ==> save(filename, "X"," Y", "U", \
"T1")

My files where recorded with an "old" scilab version (5.3)  ==> save(filename, X, Y, \
U, T1) Saved files are in a <unknow ?> binary format

Of course, I can convert ALL my files ... but if a solution exists, I'd like to know \
it.



[cid:image004.png@01CFA4EF.6C411FA0]Gilles GOBILLOT
Chargé d'études procédés ultrasonores d'imagerie et métrologies de surfaces en sodium
Under Sodium Vision and Metrology Research Fellow
Commissariat à l'Énergie Atomique et aux Énergies Alternatives
French Atomic and Alternative Energies Commission /CEA/ Cadarache Nuclear Research \
Centre Laboratoire d'Instrumentation et Essais Technologiques
DEN/DTN/STCP/LIET

Centre de Cadarache - DEN/CAD/DTN/STCP/LIET - Bâtiment 202
13108 Saint Paul Lez Durance
Tel : +33 (0)4 42 25 20 33 -  Mob : +33 (0) 6 87 99 19 57 - Fax : +33 (0)4 42 25 49 \
17 gilles.gobillot@cea.fr<mailto:gilles.gobillot@cea.fr>

«Ce message électronique et tous les fichiers attachés qu'il contient sont \
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont \
adressés. Si vous avez reçu ce message par erreur, merci d'en avertir immédiatement \
son émetteur et de ne pas en conserver de copie ».


De : users [mailto:users-bounces@lists.scilab.org] De la part de Calixte Denizet
Envoyé : vendredi 18 juillet 2014 15:26
À : users@lists.scilab.org
Objet : Re: [Scilab-users] read a "save()" file in Python

Hi Gilles,

The format of the file is based on HDF5 so you just have to use h5py and find where \
is located your matrix in the file. For your information, it is possible to use a \
Python engine in Scilab in using PIMS toolbox: \
http://forge.scilab.org/index.php/p/pims/

Best regards

Calixte

On 18/07/2014 13:59, GOBILLOT Gilles 116128 wrote:
Hi all,

In the Scilab-Python border, I try to read a file recorded with Scilab ( \
save(filename, X, Y, U, T1)   ) With U = matrix.

I'd like to read it with Python. Any idea ?

Regards,

Gilles




_______________________________________________

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users




--

Calixte Denizet

Software Development Engineer

-----------------------------------------------------------

Scilab Enterprises

143bis rue Yves Le Coz - 78000 Versailles, France

http://www.scilab-enterprises.com


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
	{font-family:"Trebuchet MS";
	panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
pre
	{mso-style-priority:99;
	mso-style-link:"Préformaté HTML Car";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Texte de bulles Car";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";
	color:black;}
span.TextedebullesCar
	{mso-style-name:"Texte de bulles Car";
	mso-style-priority:99;
	mso-style-link:"Texte de bulles";
	font-family:"Tahoma","sans-serif";
	color:black;}
span.EmailStyle20
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.PrformatHTMLCar
	{mso-style-name:"Préformaté HTML Car";
	mso-style-priority:99;
	mso-style-link:"Préformaté HTML";
	font-family:Consolas;
	color:black;}
span.EmailStyle23
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi \
Calixte <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Tanks \
for this answer.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">In \
fact HDF5 is used in recents Scilab&#8217;s versions </span><span lang="EN-US" \
style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">è</span><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">
 </span><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">save(filename, \
&#8220;X&#8221;,&#8221; Y&#8221;, &#8220;U&#8221;, \
&#8220;T1&#8221;)&nbsp;&nbsp;<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">My \
files where recorded with an &#8220;old&#8221; scilab version (5.3)&nbsp; \
</span><span lang="EN-US" \
style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">è</span><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"> \
save(filename, X, Y, U, T1)&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Saved \
files are in a &lt;unknow ?&gt; binary format </span><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <div>
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Of \
course, I can convert ALL my files &#8230; but if a solution exists, I&#8217;d like \
to know it.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:navy"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" \
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" \
filled="f" stroked="f"> <v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Image_x0020_4" o:spid="_x0000_s1026" type="#_x0000_t75" \
style='position:absolute;margin-left:0;margin-top:0;width:47.25pt;height:41.75pt;z-ind \
ex:-251657216;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height- \
percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9 \
pt;mso-wrap-distance-bottom:0;mso-position-horizontal:left;mso-position-horizontal-rel \
ative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-widt \
h-percent:0;mso-height-percent:0;mso-width-relative:margin;mso-height-relative:margin'>
 <v:imagedata src="cid:image001.gif@01CFA4EF.12FEC820" o:title="" croptop="6168f" \
cropleft="4411f" cropright="33713f" /> <w:wrap type="tight" side="right"/>
</v:shape><![endif]--><![if !vml]><img width="63" height="56" \
src="cid:image004.png@01CFA4EF.6C411FA0" align="left" hspace="12" \
v:shapes="Image_x0020_4"><![endif]><span \
style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:red">Gilles
 <b>GOBILLOT<o:p></o:p></b></span></p>
<p class="MsoNormal"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666">Chargé \
d&#8217;études procédés ultrasonores </span><span \
style="font-size:9.0pt;font-family:&quot;Trebuchet \
MS&quot;,&quot;sans-serif&quot;;color:gray">d&#8217;imagerie et métrologies de \
surfaces</span><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666"> \
en sodium<br> </span><i><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">Under \
Sodium Vision and Metrology Research Fellow</span></i><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666"><o:p></o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666">Commissariat \
à l&#8217;Énergie Atomique et aux Énergies Alternatives<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-bottom:3.0pt"><i><span \
style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">French \
Atomic and Alternative Energies Commission /CEA/ Cadarache Nuclear Research \
Centre<br> </span></i><b><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#006937">L</span></b><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#006937">aboratoire \
d&#8217;<b>I</b>nstrumentation et <b>E</b>ssais <b>T</b>echnologiques<br>
DEN/DTN/STCP/<b>LIET<br>
</b></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:navy"><img \
width="322" height="5" id="Image_x0020_3" src="cid:image003.gif@01CFA4EF.12FEC820" \
alt="cid:image003.gif@01CD94D8.985904F0"></span><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#006937"><o:p></o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666">Centre \
de Cadarache &#8211; DEN/CAD/DTN/STCP/LIET &#8211; Bâtiment 202<o:p></o:p></span></p> \
<p class="MsoNormal"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666">13108 \
Saint Paul Lez Durance<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#666666">Tel \
: &#43;33 (0)4 42 25 20 33 -&nbsp; Mob&nbsp;: &#43;33 (0) 6 87 99 19 57 - Fax : \
&#43;33 (0)4 42 25 49 17<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><a \
href="mailto:gilles.gobillot@cea.fr"><span \
style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">gilles.gobillot@cea.fr</span></a></span><i><u><span \
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:navy"><o:p></o:p></span></u></i></p>
 <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><i><span \
style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:red">«Ce \
message électronique et tous les fichiers attachés qu'il contient sont confidentiels \
et destinés exclusivement à l'usage de la personne  à laquelle ils sont adressés. Si \
vous avez reçu ce message par erreur, merci d'en avertir immédiatement son émetteur \
et de ne pas en conserver de copie&nbsp;».</span></i><span \
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
 </div>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">De&nbsp;:</span></b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> \
users [mailto:users-bounces@lists.scilab.org] <b>De la part de</b> Calixte \
Denizet<br> <b>Envoyé&nbsp;:</b> vendredi 18 juillet 2014 15:26<br>
<b>À&nbsp;:</b> users@lists.scilab.org<br>
<b>Objet&nbsp;:</b> Re: [Scilab-users] read a &quot;save()&quot; file in \
Python<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi Gilles,<br>
<br>
The format of the file is based on HDF5 so you just have to use h5py and find where \
is located your matrix in the file.<br> For your information, it is possible to use a \
Python engine in Scilab in using PIMS toolbox:<br> <a \
href="http://forge.scilab.org/index.php/p/pims/">http://forge.scilab.org/index.php/p/pims/</a><br>
 <br>
Best regards<br>
<br>
Calixte<br>
<br>
On 18/07/2014 13:59, GOBILLOT Gilles 116128 wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi \
all,</span><o:p></o:p></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">In \
the Scilab-Python border, I try to read a file recorded with Scilab ( save(filename, \
X, Y, U, T1)&nbsp;&nbsp; ) With U = matrix.</span><o:p></o:p></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I&#8217;d \
like to read it with Python. Any idea ?</span><o:p></o:p></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Regards,</span><o:p></o:p></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Gilles</span><o:p></o:p></p>
 <p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>users mailing list<o:p></o:p></pre>
<pre><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><o:p></o:p></pre>
 <pre><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre>
 </blockquote>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Calixte Denizet<o:p></o:p></pre>
<pre>Software Development Engineer<o:p></o:p></pre>
<pre>-----------------------------------------------------------<o:p></o:p></pre>
<pre>Scilab Enterprises<o:p></o:p></pre>
<pre>143bis rue Yves Le Coz - 78000 Versailles, France<o:p></o:p></pre>
<pre><a href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a><o:p></o:p></pre>
 </div>
</body>
</html>


["image001.gif" (image/gif)]
["image003.gif" (image/gif)]
["image004.png" (image/png)]

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

--===============6788881635793513180==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic