<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Colourdiscon.py</id>
	<title>Colourdiscon.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Colourdiscon.py"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Colourdiscon.py&amp;action=history"/>
	<updated>2026-04-09T08:07:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Colourdiscon.py&amp;diff=1291&amp;oldid=prev</id>
		<title>Adk44: Created page with &quot;Script useful for DISCONNECTIVITY users  To do this save the code in &#039;&#039;colourdiscon.py&#039;&#039; file, change privileges of this file:   chmod 755 colourdiscon.py  and type:   ./Colou...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Colourdiscon.py&amp;diff=1291&amp;oldid=prev"/>
		<updated>2019-05-13T12:16:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Script useful for DISCONNECTIVITY users  To do this save the code in &amp;#039;&amp;#039;colourdiscon.py&amp;#039;&amp;#039; file, change privileges of this file:   chmod 755 colourdiscon.py  and type:   ./Colou...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Script useful for DISCONNECTIVITY users&lt;br /&gt;
&lt;br /&gt;
To do this save the code in &amp;#039;&amp;#039;colourdiscon.py&amp;#039;&amp;#039; file, change privileges of this file:&lt;br /&gt;
&lt;br /&gt;
 chmod 755 colourdiscon.py&lt;br /&gt;
&lt;br /&gt;
and type:&lt;br /&gt;
&lt;br /&gt;
 ./Colourdiscon.py list&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/python&lt;br /&gt;
 &lt;br /&gt;
 import numpy &lt;br /&gt;
 import sys&lt;br /&gt;
 import getopt &lt;br /&gt;
 &lt;br /&gt;
 print files (test.out.int.*) comprised of a set of minima sorted into a set of bins by an order parameter&lt;br /&gt;
 &lt;br /&gt;
 Used for colouring discon graphs&lt;br /&gt;
 &lt;br /&gt;
 Order Parameter   Minima # file format&lt;br /&gt;
 &lt;br /&gt;
 AMHQ         0.1653832         6&lt;br /&gt;
 &lt;br /&gt;
 x=[] &lt;br /&gt;
 y=[]&lt;br /&gt;
 bins = [0.0, 0.4, 0.6, 0.8, 1.0] &lt;br /&gt;
 &lt;br /&gt;
 filename = sys.argv[1] &lt;br /&gt;
 &lt;br /&gt;
 f=open(filename,&amp;quot;r&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 for line in f:&lt;br /&gt;
        tokens=line.split()&lt;br /&gt;
        x.append(float(tokens[1]))&lt;br /&gt;
        y.append(int(tokens[2]))&lt;br /&gt;
 &lt;br /&gt;
 total=[]&lt;br /&gt;
 &lt;br /&gt;
 for a, b in enumerate(bins):&lt;br /&gt;
    total.append([])&lt;br /&gt;
    for i in range(len(x)):&lt;br /&gt;
       if x[i] &amp;gt;= b and x[i] &amp;lt; bins[a+1] :&lt;br /&gt;
               total[a].append(y[i])&lt;br /&gt;
 &lt;br /&gt;
 for a, b in enumerate(bins):&lt;br /&gt;
      filefile=&amp;quot;test.out.int&amp;quot;+str(a)&lt;br /&gt;
      numpy.savetxt(filefile, total[a], fmt=&amp;#039;%d&amp;#039;)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>