<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi, <br>
</p>
<p><br>
</p>
<p>I have been automating the creation of positions using python scripts. Something relatively simple like p001, p002, etc.<br>
</p>
<p><br>
</p>
<p>When I examine the positions using the python commands<br>
</p>
<p>from Midas import positions<br>
</p>
<p>pnames = positions.keys()<br>
</p>
<p><br>
</p>
<p>at first things appear as I would expect, but later the sequence changes relative to the index, why is that?<br>
</p>
<p><br>
</p>
<p>for example, using this to print the positions<br>
</p>
<p><br>
</p>
<div></div>
<div>
<div> pnames = positions.keys()</div>
<div> i=0</div>
<div> for pname in pnames:</div>
<div> print i,pnames[i]</div>
<div> i=i+1<br>
</div>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<p>I get these results:<br>
</p>
<p><br>
</p>
<div>savepos p000</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">savepos</span> p001<br>
</div>
<div>0 p000</div>
<div>1 p001<br>
</div>
<div>(as expected)<br>
</div>
<div><br>
</div>
<div></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">savepos</span> p002</div>
<div>0 p000<br>
</div>
<div>1 p001</div>
<div>2 p002<br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">(as expected)</span><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></div>
<div></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">savepos</span> p003</div>
<div>0 p000</div>
<div>1 p001</div>
<div>2 p002</div>
<div>3 p003<br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">(as expected)</span><br>
</div>
<div><br>
</div>
<div></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">savepos</span> p004</div>
<div>0 p004</div>
<div>1 p000</div>
<div>2 p001</div>
<div>3 p002</div>
<div>4 p003<br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">(not as expected)</span><br>
</div>
<div><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"></span></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">savepos</span> p005</div>
<div>0 p004</div>
<div>1 p005</div>
<div>2 p000</div>
<div>3 p001</div>
<div>4 p002</div>
<div>5 p003<br>
</div>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">(not as expected)</span><br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">I would expect pnames[0] to correspond to the first position created, pnames[1] to the second posiiton created, etc., assuming no ~savepos
used. </span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Want to create a situation where the default names would be pxxx, but could later be altered to more meaningful names but maintain the
order of creation, or getting a session file from someone I would use their position names and tack on my default names to the end of the position list.</span></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Matthew Dougherty<br>
National Center for Macromolecular Imaging<br>
Baylor College of Medicine<br>
===========================================================================</div>
</font></div>
</div>
</div>
</body>
</html>