<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Chandra_Coverage_%28xfig_example%29</id>
	<title>Chandra Coverage (xfig example) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Chandra_Coverage_%28xfig_example%29"/>
	<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;action=history"/>
	<updated>2026-04-18T19:39:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=1208&amp;oldid=prev</id>
		<title>Obst at 10:50, 18 April 2018</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=1208&amp;oldid=prev"/>
		<updated>2018-04-18T10:50:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:50, 18 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l136&quot; &gt;Line 136:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 136:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;And now: the Roche lobe contours in the x-y-plane. The x-z-plane works analoguely.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;And now: the Roche lobe contours in the x-y-plane. The x-z-plane works analoguely. The whole secret here is to know that our isisscripts provide functions&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The whole secret here is to know that our isisscripts provide functions&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to calculate the Roche potential; namely, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;Roche_lobe_dimension&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;Roche_potential&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;Roche_equipotential_volume&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to calculate the Roche potential; namely, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;Roche_lobe_dimension&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;Roche_potential&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;, and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;Roche_equipotential_volume&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;get_contour_lines&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt; &lt;/ins&gt;is used for historical reasons. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;gcontour_compute&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt; &lt;/ins&gt;from the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;gcontour&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt; &lt;/ins&gt;module shipped with slxfig is much more efficient!) Feel free to read the help for each of them!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;get_contour_lines&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/del&gt;is used for historical reasons. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;gcontour_compute&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/del&gt;from the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;gcontour&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/del&gt;module shipped with slxfig is much more efficient!)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Feel free to read the help for each of them!&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=1104&amp;oldid=prev</id>
		<title>Obst: Obst moved page Example: Chandra Coverage to Chandra Coverage (xfig example) without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=1104&amp;oldid=prev"/>
		<updated>2018-04-17T08:49:09Z</updated>

		<summary type="html">&lt;p&gt;Obst moved page &lt;a href=&quot;/wiki/index.php?title=Example:_Chandra_Coverage&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Example: Chandra Coverage (page does not exist)&quot;&gt;Example: Chandra Coverage&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php/Chandra_Coverage_(xfig_example)&quot; title=&quot;Chandra Coverage (xfig example)&quot;&gt;Chandra Coverage (xfig example)&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:49, 17 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=996&amp;oldid=prev</id>
		<title>Gokus: Created page with &quot;  Category:SLxfig ===== Chandra coverage of Cyg X-1 =====  Here you can see two different things: first how to create a nice circular diagram, and second how to calculate...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Chandra_Coverage_(xfig_example)&amp;diff=996&amp;oldid=prev"/>
		<updated>2018-04-13T12:21:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  &lt;a href=&quot;/wiki/index.php/Category:SLxfig&quot; title=&quot;Category:SLxfig&quot;&gt;Category:SLxfig&lt;/a&gt; ===== Chandra coverage of Cyg X-1 =====  Here you can see two different things: first how to create a nice circular diagram, and second how to calculate...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SLxfig]]&lt;br /&gt;
===== Chandra coverage of Cyg X-1 =====&lt;br /&gt;
&lt;br /&gt;
Here you can see two different things: first how to create a nice circular diagram, and second how to calculate the Roche lobe for the companion star in isis.&lt;br /&gt;
&lt;br /&gt;
We start with the script for the figure:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
require(&amp;quot;isisscripts&amp;quot;);&lt;br /&gt;
require(&amp;quot;xfig&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
% define a couple of colors in hex-RGB:&lt;br /&gt;
xfig_new_color(&amp;quot;3815n&amp;quot;, 0xA00000);&lt;br /&gt;
xfig_new_color(&amp;quot;3814&amp;quot;,  0xA0A000);&lt;br /&gt;
xfig_new_color(&amp;quot;8525&amp;quot;,  0x00A000);&lt;br /&gt;
xfig_new_color(&amp;quot;9847&amp;quot;,  0x0000E0);&lt;br /&gt;
xfig_new_color(&amp;quot;11044&amp;quot;, 0x600080);&lt;br /&gt;
xfig_new_color(&amp;quot;gray&amp;quot;,  0x808080);&lt;br /&gt;
&lt;br /&gt;
% encode the observing modes for Chandra:&lt;br /&gt;
variable TE = 0;&lt;br /&gt;
variable CC = 1;&lt;br /&gt;
&lt;br /&gt;
% collect the information about all the Chandra observations:&lt;br /&gt;
% { ObsID, orbital phases (min, max), plot-radius, observing mode, ASM-rate, (plot-color) }&lt;br /&gt;
variable observations =&lt;br /&gt;
[ {  &amp;quot;107&amp;quot;, 0.908, 0.940, 0.5, TE, 32.35 },  % 0&lt;br /&gt;
  {  &amp;quot;107&amp;quot;, 0.723, 0.751, 0.5, TE, 32.35 },  % 1&lt;br /&gt;
  { &amp;quot;1511&amp;quot;, 0.819, 0.845, 0.5, CC, 21.4  },  % 2&lt;br /&gt;
  { &amp;quot;2415&amp;quot;, 0.734, 0.796, 0.7, CC, 29.3  },  % 3&lt;br /&gt;
  { &amp;quot;3407&amp;quot;, 0.847, 0.909, 0.7, CC, 49.07 },  % 4&lt;br /&gt;
  { &amp;quot;2741&amp;quot;, 0.196, 0.206, 0.6, TE, 69.75 },  % 5&lt;br /&gt;
  { &amp;quot;2742&amp;quot;, 0.522, 0.532, 0.6, TE, 66.59 },  % 6&lt;br /&gt;
  { &amp;quot;2743&amp;quot;, 0.704, 0.714, 0.6, TE, 43.09 },  % 7&lt;br /&gt;
  { &amp;quot;3724&amp;quot;, 0.964, 0.019, 0.5, CC, 61.29 },  % 8&lt;br /&gt;
  { &amp;quot;3815&amp;quot;, 0.703, 0.818, 0.8, CC, 25.79, &amp;quot;3815n&amp;quot; },  % 9&lt;br /&gt;
  { &amp;quot;3814&amp;quot;, 0.925, 0.025, 0.8, TE, 17.55, &amp;quot;3814&amp;quot; },  % 10&lt;br /&gt;
  { &amp;quot;8525&amp;quot;, 0.017, 0.079, 0.85, TE, 13.52, &amp;quot;8525&amp;quot; },  % 11&lt;br /&gt;
  { &amp;quot;9847&amp;quot;, 0.17 , 0.21 , 0.85, TE, 17.52, &amp;quot;9847&amp;quot; },  % 12&lt;br /&gt;
  {&amp;quot;11044&amp;quot;, 0.4775,0.54 , 0.85, TE, 18.38, &amp;quot;11044&amp;quot; },  % 13&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
% The radius of the plot&lt;br /&gt;
variable R = 5;&lt;br /&gt;
&lt;br /&gt;
% We want to draw a lot of arcs, therefore we ease our work&lt;br /&gt;
% by creating a function that does the job for us.&lt;br /&gt;
% The minimum required information are center and radius of the&lt;br /&gt;
% underlying circle. This arc defaults to a full circle if no start &lt;br /&gt;
% stop values for the angle are given.&lt;br /&gt;
define xfig_new_polyline_arc()&lt;br /&gt;
{&lt;br /&gt;
  variable x, y, r, phi1=0, phi2=2*PI;&lt;br /&gt;
  switch(_NARGS)&lt;br /&gt;
  { case 3: (x, y, r) = (); }&lt;br /&gt;
  { case 5: (x, y, r, phi1, phi2) = (); }&lt;br /&gt;
&lt;br /&gt;
  variable N = qualifier(&amp;quot;N&amp;quot;, 720);&lt;br /&gt;
  variable phi = [phi1 : phi2 : #N];&lt;br /&gt;
  return xfig_new_polyline(x+r*cos(phi), y+r*sin(phi), 0*phi;; __qualifiers());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% load Roche lobe of star:&lt;br /&gt;
% How to create the fits file with the Roche lobe information&lt;br /&gt;
% is shown in the separate script below&lt;br /&gt;
$1 = &amp;quot;Roche_contours_xy_q0.567.fits+2&amp;quot;;&lt;br /&gt;
vmessage(&amp;quot;V/V[Roche] = %f&amp;quot;, fits_read_key($1, &amp;quot;V_VR&amp;quot;));&lt;br /&gt;
variable Roche = fits_read_table($1);&lt;br /&gt;
struct_filter(Roche, [[::50]]);  % take only every 50th element of the struct's arrays&lt;br /&gt;
&lt;br /&gt;
% show only the observations corresponding to these indices:&lt;br /&gt;
variable inds=[9:13];&lt;br /&gt;
{&lt;br /&gt;
  variable xfig = xfig_new_compound();&lt;br /&gt;
&lt;br /&gt;
  % drawing the coordinate system:&lt;br /&gt;
  xfig.insert( xfig_new_polyline_arc(0, 0, R; N=100) );&lt;br /&gt;
  variable phi;&lt;br /&gt;
  for(phi=0; phi&amp;lt;0.99; phi+=0.1)&lt;br /&gt;
  { % tic marks:&lt;br /&gt;
    $1 = -[0.98, 1.02]*R;&lt;br /&gt;
    variable c = cos(2*PI*phi);&lt;br /&gt;
    variable s = sin(2*PI*phi);&lt;br /&gt;
    xfig.insert(xfig_new_polyline($1*c, $1*s));&lt;br /&gt;
    % ticlabels:&lt;br /&gt;
    $1 = -1.05*R;&lt;br /&gt;
    xfig.insert( xfig_new_text(sprintf(&amp;quot;%.1f&amp;quot;, phi); rotate=360*phi+90, x0=$1*c, y0=$1*s) );&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  % star&lt;br /&gt;
  $1 = .2*R;&lt;br /&gt;
  xfig_new_color(&amp;quot;lightblue&amp;quot;, 0x80C0FF);&lt;br /&gt;
  xfig.insert( xfig_new_polyline($1*(Roche.x-1), $1*Roche.y; fillcolor=&amp;quot;lightblue&amp;quot;, depth=60, closed) );&lt;br /&gt;
  xfig.insert( xfig_new_text(&amp;quot;\texttt{\small x}&amp;quot;R) );&lt;br /&gt;
&lt;br /&gt;
  % observations&lt;br /&gt;
  variable obs;&lt;br /&gt;
  variable i = 0;&lt;br /&gt;
  foreach obs (observations[inds])&lt;br /&gt;
  {&lt;br /&gt;
    variable phi1 = obs[1]*2*PI;&lt;br /&gt;
    variable phi2 = obs[2]*2*PI;&lt;br /&gt;
    if(phi2&amp;lt;phi1)  phi2 += 2*PI;&lt;br /&gt;
    variable r = -obs[3]*R;  % for many observationv this is just a more or less random number &lt;br /&gt;
                             % to avoid overlap between distinct observations&lt;br /&gt;
    i++;&lt;br /&gt;
    variable col = obs[6]; &lt;br /&gt;
% The commented code produces the same colors as in the previous example with the light curve.&lt;br /&gt;
% They are color coding the hardness of the observation.&lt;br /&gt;
%    $1 = int( log(obs[5]/13.5)/log(70/13.5)*256);&lt;br /&gt;
%    xfig_new_color(col, $1 * 0x010000 + 0xFF-$1);&lt;br /&gt;
    xfig.insert(xfig_new_polyline_arc(0, 0, r, phi1, phi2; N=50, width=7, line=obs[4], color=col));&lt;br /&gt;
&lt;br /&gt;
    variable phi = [phi1:phi2:#50];&lt;br /&gt;
    variable x = r*cos(phi);&lt;br /&gt;
    variable y = r*sin(phi);&lt;br /&gt;
&lt;br /&gt;
    % draw dashed lines from the center to the edges of the observation&lt;br /&gt;
    xfig.insert( xfig_new_polyline([x[ 0], 0], [y[ 0], 0]; line=1, color=col) );&lt;br /&gt;
    xfig.insert( xfig_new_polyline([x[-1], 0], [y[-1], 0]; line=1, color=col) );&lt;br /&gt;
    &lt;br /&gt;
    % and finally label the observation with its obsID&lt;br /&gt;
    phi = (phi1+phi2)/2;&lt;br /&gt;
    $1 = r*.9;&lt;br /&gt;
    variable col = xfig_lookup_color_rgb(obs[6]);&lt;br /&gt;
    xfig.insert( xfig_new_text(sprintf(&amp;quot;\definecolor{c}{rgb}{%.3f,%.3f,%.3f}\color{c}%s&amp;quot;R,&lt;br /&gt;
                                       (col &amp;gt;&amp;gt; 16)*1./255, ((col &amp;amp; 0x00FF00) &amp;gt;&amp;gt; 8)*1./255, (col &amp;amp; 0x0000FF)*1./255, obs[0]);&lt;br /&gt;
                               rotate=180*phi/PI+90, x0=$1*cos(phi), y0=$1*sin(phi)) );&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  % we are done and can render the figure:&lt;br /&gt;
  xfig.render(&amp;quot;Chandra_coverage.pdf&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And now: the Roche lobe contours in the x-y-plane. The x-z-plane works analoguely.&lt;br /&gt;
The whole secret here is to know that our isisscripts provide functions&lt;br /&gt;
to calculate the Roche potential; namely, ''Roche_lobe_dimension'', ''Roche_potential'', and ''Roche_equipotential_volume''.&lt;br /&gt;
(''get_contour_lines'' is used for historical reasons. ''gcontour_compute'' from the ''gcontour'' module shipped with slxfig is much more efficient!)&lt;br /&gt;
Feel free to read the help for each of them!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
require(&amp;quot;isisscripts&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
variable q = 0.567; % mass ration of the two objects&lt;br /&gt;
variable RL = Roche_lobe_dimension(q); &lt;br /&gt;
variable x = [1.01*RL.xmin : 1.01*RL.xmax : #2000];&lt;br /&gt;
variable y = [1.01*RL.ymin : 1.01*RL.ymax : #2000];&lt;br /&gt;
variable X, Y; (X,Y) = get_grid(x, y; reshape);&lt;br /&gt;
&lt;br /&gt;
variable phi = Roche_potential(X, Y; q=q);&lt;br /&gt;
plot_image(phi, 1, x, y);&lt;br /&gt;
&lt;br /&gt;
variable fp = fits_open_file(sprintf(&amp;quot;Roche_contours_xy_q%.3f.fits&amp;quot;, q), &amp;quot;c&amp;quot;);&lt;br /&gt;
variable VRoche = NULL;&lt;br /&gt;
% fits_write_image_hdu(fp, sprintf(&amp;quot;Roche potential(q=%.3f)&amp;quot;, q), phi);&lt;br /&gt;
&lt;br /&gt;
variable potential;&lt;br /&gt;
foreach potential ({&lt;br /&gt;
 [1., RL.potential],&lt;br /&gt;
 [.9, -3.177503], % star filling 90% of Roche lobe -&amp;gt; will be 2nd table in fits file&lt;br /&gt;
#iffalse&lt;br /&gt;
 [.95, -3.139556],&lt;br /&gt;
 [.8, -3.264192],&lt;br /&gt;
 [.7, -3.368641],&lt;br /&gt;
 [.6, -3.497279],&lt;br /&gt;
 [.5, -3.660313],&lt;br /&gt;
 [.4, -3.876381],&lt;br /&gt;
 [.3, -4.183464],&lt;br /&gt;
 [.2, -4.677502],&lt;br /&gt;
#endif&lt;br /&gt;
})&lt;br /&gt;
{&lt;br /&gt;
  vmessage(&amp;quot;V/V[Roche] = %.2f,  phi = %f&amp;quot;, potential[0], potential[1]);&lt;br /&gt;
  variable cont = get_contour_lines(phi, potential[1]);&lt;br /&gt;
  oplot(x[cont[0].x], y[cont[0].y]);&lt;br /&gt;
  variable V = Roche_equipotential_volume(q; phi=potential[1]);&lt;br /&gt;
  if(VRoche==NULL)  VRoche = V;&lt;br /&gt;
  fits_write_binary_table(fp, sprintf(&amp;quot;V/V[Roche(q=%.3f)]=%.3f&amp;quot;, q, V/VRoche),&lt;br /&gt;
        struct { x = x[cont[0].x], y = y[cont[0].y] },&lt;br /&gt;
        struct { q = q, phiRoche = potential[1], volume = V, V_VR = V/VRoche, r_rR = (V/VRoche)^(1./3) }&lt;br /&gt;
  );&lt;br /&gt;
}&lt;br /&gt;
fits_close_file(fp);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gokus</name></author>
	</entry>
</feed>