<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The AstroStat Slog &#187; Chandra</title>
	<atom:link href="http://groundtruth.info/AstroStat/slog/tag/chandra/feed/" rel="self" type="application/rss+xml" />
	<link>http://groundtruth.info/AstroStat/slog</link>
	<description>Weaving together Astronomy+Statistics+Computer Science+Engineering+Intrumentation, far beyond the growing borders</description>
	<lastBuildDate>Fri, 09 Sep 2011 17:05:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Everybody needs crampons</title>
		<link>http://groundtruth.info/AstroStat/slog/2010/sherpa-cheat-sheet/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2010/sherpa-cheat-sheet/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 16:12:36 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Fitting]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[ciao]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Sherpa]]></category>
		<category><![CDATA[Sherpa4]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/2007/sherpa-cheat-sheet/</guid>
		<description><![CDATA[Sherpa is a fitting environment in which Chandra data (and really, X-ray data from any observatory) can be analyzed.  It has just undergone a major update and now runs on python.  Or allows python to run.  Something like that.  It is a very powerful tool, but I can never remember how [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cxc.harvard.edu/sherpa/">Sherpa</a> is a fitting environment in which Chandra data (and really, X-ray data from any observatory) can be analyzed.  It has just undergone a major update and now runs on python.  Or allows python to run.  Something like that.  It is a very powerful tool, but I can never remember how to use it, and I have an amazing knack for not finding what I need in the documentation.  So here is a little cheat sheet  (which I will keep updating <strike>as and when</strike> if I learn more): <span id="more-204"></span></p>
<p><strong>2010-apr-30:</strong> Aneta has setup a blogspot site to deal with simple Sherpa techniques and tactics: <a href="http://pysherpa.blogspot.com/">http://pysherpa.blogspot.com/</a></p>
<p>On Help:</p>
<ul>
<li> In general, to get help, use: <code>ahelp "something"</code> (note the quotes)</li>
<li> Even more useful, type: <code>? wildcard</code> to get a list of all commands that include the <code>wildcard</code></li>
<li> You can also do a form of autocomplete: type TAB after writing half a command to get a list of all possible completions.</li>
</ul>
<p>Data I/O:</p>
<ul>
<li> To read in your PHA file, use: <code>load_pha()</code></li>
<li>Often for Chandra spectra, the background is included in that same file.  In any case, to read it in separately, use: <code>load_bkg()</code>
<ul>
<li>Q: should it be loaded in to the same dataID as the source?</li>
<li>A: Yes.</li>
<li>A: When the background counts are present in the same file, they can be read in separately and assigned to the background via <code>set_bkg('src',get_data('bkg'))</code>, so counts from a different file can be assigned as background to the current spectrum.</li>
</ul>
</li>
<li> To read in the corresponding ARF, use: <code>load_arf()</code>
<ul>
<li>Q: <code>load_bkg_arf()</code> for the background &#8212; should it be done before or after <code>load_bkg()</code>, or does it matter?</li>
<li>A: does not matter</li>
</ul>
</li>
<li> To read in the corresponding RMF, use: <code>load_rmf()</code>
<ul>
<li>Q: <code>load_bkg_rmf()</code> for the background, and same question as above</li>
<li>A: same answer as above; does not matter.</li>
</ul>
</li>
<li> To see the structure of the data, type: <code>print(get_data())</code> and <code>print(get_bkg())</code></li>
<li> To select a subset of channels to analyze, use: <code>notice_id()</code></li>
<li> To subtract background from source data, use: <code>subtract()</code></li>
<li> To not subtract, to undo the subtraction, etc., use: <code>unsubtract()</code></li>
<li> To plot useful stuff, use: <code>plot_data(), plot_bkg(), plot_arf(), plot_model(), plot_fit(),</code> etc.</li>
<li>(Q: how in god&#8217;s name does one avoid plotting those damned error bars?  I know error bars are necessary, but when I have a spectrum with 8192 bins, I don&#8217;t want it washed out with silly 1-sigma Poisson bars.  And while we are asking questions, how do I change the units on the y-axis to counts/bin?  A: rumors say that <code>plot_data(1,yerr=0)</code> should do the trick, but it appears to be still in the development version.)</li>
</ul>
<p>Fitting:</p>
<ul>
<li> To fit model to the data, command it to: <code>fit()</code></li>
<li> To get error bars on the fit parameters, use: <code>projection()</code> (or <code>covar()</code>, but why deliberately use a function that is guaranteed to underestimate your error bars?)</li>
<li> Defining models appears to be much easier now.  You can use syntax like: <code>set_source(<em>ModelName.ModelID+AnotherModel.ModelID2</em>)</code> (where you can distinguish between different instances of the same type of model using the ModelID &#8212; e.g., <code>set_source(<em>xsphabs.abs1*powlaw1d.psrc+powlaw1d.pbkg</em>)</code>)</li>
<li>To see what the model parameter values are, type: <code>print(get_model())</code></li>
<li>To change statistic, use: set_stat() (options are various <code>chisq</code> types, <code>cstat,</code> and <code>cash</code>)</li>
<li>To change the optimization method, use: <code>set_method()</code> (options are <code>levmar, moncar,  neldermead, simann, simplex</code>)</li>
</ul>
<hr noshade/>
<em>Timestamps:</em><br />
<code>v1:2007-dec-18</code><br />
<code>v2:2008-feb-20</code><br />
<code>v3:2010-apr-30</code></p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2010/sherpa-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[MADS] Chernoff face</title>
		<link>http://groundtruth.info/AstroStat/slog/2009/mads-chernoff-face/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2009/mads-chernoff-face/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 16:00:41 +0000</pubDate>
		<dc:creator>hlee</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Cross-Cultural]]></category>
		<category><![CDATA[Data Processing]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[Methods]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Spectral]]></category>
		<category><![CDATA[Stars]]></category>
		<category><![CDATA[X-ray]]></category>
		<category><![CDATA[arXiv]]></category>
		<category><![CDATA[calibration]]></category>
		<category><![CDATA[Capella]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[Chernoff face]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[line ratios]]></category>
		<category><![CDATA[MADS]]></category>
		<category><![CDATA[XAtlas]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=2059</guid>
		<description><![CDATA[I cannot remember when I first met Chernoff face but it hooked me up instantly. I always hoped for confronting multivariate data from astronomy applicable to this charming EDA method. Then, somewhat such eager faded, without realizing what&#8217;s happening. Tragically, this was mainly due to my absent mind. 
After meeting Prof. Herman Chernoff unexpectedly &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I cannot remember when I first met <b>Chernoff face</b> but it hooked me up instantly. I always hoped for confronting multivariate data from astronomy applicable to this charming EDA method. Then, somewhat such eager faded, without realizing what&#8217;s happening. Tragically, this was mainly due to my absent mind.<span id="more-2059"></span> </p>
<p>After meeting Prof. Herman Chernoff unexpectedly &#8211; I didn&#8217;t know he is Professor Emeritus at Harvard &#8211; the urge revived but I didn&#8217;t have data, still then. Alas, another absent mindedness: I don&#8217;t understand why I didn&#8217;t realize that I already have the data, XAtlas for trying Chernoff faces until today. Data and its full description is found from <a href="http://cxc.harvard.edu/XATLAS/">the XAtlas website (click).</a> For Chernoff face, references suggested in <a href="http://en.wikipedia.org/wiki/Chernoff_face">Wiki:Chernoff face</a> are good. I believe some folks are already familiar with Chernoff faces from a New York Times article last year, listed in Wiki (or a subset characterized by  baseball lovers?).</p>
<p><a href="http://en.wikipedia.org/wiki/Capella_(star)">Capella</a> is a X-ray bright star observed multiple times for Chandra calibration. I listed 16 ObsIDs in the figures below at each face, among 18+ Capella observations (Last time when I checked Chandra Data Archive, 18 Capella observations were available). These 16 are high resolution observations from which various metrics like interesting line ratios and line to continuum ratios can be extracted. I was told that optically it&#8217;s hard to find any evidence that Capella experienced catastrophic changes during the Chandra mission (about 10 years in orbit) but the story in X-ray can&#8217;t be very different. In a dismally short time period (10 years for a star is a flash or less), Capella could have revealed short time scale high energy activities via Chandra. I just wanted to illustrate that Chernoff faces could help visualizing such changes or any peculiarities through interpretation friendly facial expressions (Studies have confirmed babies&#8217; ability in facial expression recognitions). So, what do you think? Do faces look similar/different to you? Can you offer me astronomical reasons for why a certain face (ObsID) is different from the rest? </p>
<table>
<tr>
<td><img src="http://groundtruth.info/AstroStat/slog/wp-content/uploads/2009/04/faces.jpg" alt="faces" title="faces" width="450" height="450" class="alignleft size-full wp-image-2069"/> <img src="http://groundtruth.info/AstroStat/slog/wp-content/uploads/2009/04/faces2-300x300.jpg" alt="faces2" title="faces2" width="400" height="400" class="alignright size-full wp-image-2070"/> </td>
</tr>
</table>
<p><b>p.s.</b> In order to draw these Chernoff faces, check descriptions of these R functions, <a href="http://finzi.psych.upenn.edu/R/library/TeachingDemos/html/faces.html">faces()</a> (yields the left figure) or <a href="http://finzi.psych.upenn.edu/R/library/TeachingDemos/html/faces2.html">faces2()</a> (yields the right figure) by clicking on the function of your interest. There are other variations and other data analysis systems offer different fashioned tools for drawing Chernoff faces to explore multivariate data. Welcome any requests for plots in pdf. These jpeg files look too coarse on my screen. </p>
<p><b>p.p.s.</b> Variables used for these faces are line ratios and line to continuum ratios, and the order of these input variables could change countenance but impressions from faces will not change (a face with distinctive shapes will look different than other faces even after the order of metrics/variables is scrambled or using different Chernoff face illustration tools). Mapping, say from an astronomical metric to the length of lips was not studied in this post.</p>
<p><b>p.p.p.s.</b> Some data points are statistical outliers, not sure about how to explain strange numbers (unrealistic values for line ratios). I hope astronomers can help me to interpret those peculiar numbers in line/continuum ratios. My role is to show that statistics can motivate astronomers for new discoveries and to offer different graphics tools for enhancing visualization. I hope these faces motivate some astronomers to look into Capella in XAtlas (and beyond) in details with different spectacles, and find out the reasons for different facial expressions in Capella X-ray observations. Particularly, ObsID 1199 is most questionable to me.  </p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2009/mads-chernoff-face/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Astroart Survey</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/astroart-survey/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/astroart-survey/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 12:42:01 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Cross-Cultural]]></category>
		<category><![CDATA[Imaging]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[astroart]]></category>
		<category><![CDATA[astronomy]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[pretty pictures]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=1215</guid>
		<description><![CDATA[Astronomy is known for its pretty pictures, but as Joe the Astronomer would say, those pretty pictures don&#8217;t make themselves.  A lot of thought goes into maximizing scientific content while conveying just the right information, all discernible at a single glance.  So the hardworkin folks at Chandra want your help in figuring out [...]]]></description>
			<content:encoded><![CDATA[<p>Astronomy is known for its pretty pictures, but as Joe the Astronomer would say, those pretty pictures don&#8217;t make themselves.  A lot of thought goes into maximizing scientific content while conveying just the right information, all discernible at a single glance.  So the hardworkin folks at <a href="http://chandra.harvard.edu/blog/node/91">Chandra</a> want your help in figuring out what works and how well, and they have set up a <a href="http://astroart.cfa.harvard.edu/">survey</a> at <a href="http://astroart.cfa.harvard.edu/">http://astroart.cfa.harvard.edu/</a>.  Take the survey, it is both interesting and challenging!</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/astroart-survey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go Maroons!</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/go-maroons/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/go-maroons/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 11:50:09 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[High-Energy]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Optical]]></category>
		<category><![CDATA[X-ray]]></category>
		<category><![CDATA[gamma-ray]]></category>
		<category><![CDATA[CGRO]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[Compton]]></category>
		<category><![CDATA[CXO]]></category>
		<category><![CDATA[Fermi]]></category>
		<category><![CDATA[GLAST]]></category>
		<category><![CDATA[HST]]></category>
		<category><![CDATA[Hubble]]></category>
		<category><![CDATA[observatory]]></category>
		<category><![CDATA[UChicago]]></category>
		<category><![CDATA[University of Chicago]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=504</guid>
		<description><![CDATA[UChicago, my alma mater, is doing alright for itself in the spacecraft naming business.
First there was Edwin Hubble (S.B. 1910, Ph.D. 1917).
Then came Arthur Compton (the &#8220;MetLab&#8221;).
Followed by Subramanya Chandrasekhar (Morton D. Hull Distinguished Service Professor of Theoretical Astrophysics).
And now, Enrico Fermi.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.uchicago.edu/">UChicago</a>, my alma mater, is doing alright for itself in the spacecraft naming business.</p>
<p>First there was Edwin <a href="http://www.stsci.edu/hst/">Hubble</a> (S.B. 1910, Ph.D. 1917).<br />
Then came Arthur <a href="http://heasarc.gsfc.nasa.gov/docs/cgro/">Compton</a> (the &#8220;MetLab&#8221;).<br />
Followed by Subramanya <a href="http://chandra.harvard.edu/">Chandrasekhar</a> (Morton D. Hull Distinguished Service Professor of Theoretical Astrophysics).</p>
<p>And now, Enrico <a href="http://www.nasa.gov/mission_pages/GLAST/news/glast_renamed.html">Fermi</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/go-maroons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reduced and Processed Data</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/reduced-data/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/reduced-data/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:55:09 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Data Processing]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[ADC]]></category>
		<category><![CDATA[astro catalogs]]></category>
		<category><![CDATA[Cast]]></category>
		<category><![CDATA[CDF-S]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[datasets]]></category>
		<category><![CDATA[HEASARC]]></category>
		<category><![CDATA[Penn State]]></category>
		<category><![CDATA[reduced]]></category>
		<category><![CDATA[standard processing]]></category>
		<category><![CDATA[W3Browse]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=364</guid>
		<description><![CDATA[Hyunsook recently said that she wished that there were &#8220;some astronomical data depositories where no data reduction is required but one can apply various statistical analyses to the data in the depository to learn and compare statistical methods&#8221;.  With the caveat that there really is no such thing (every dataset will require case specific [...]]]></description>
			<content:encoded><![CDATA[<p>Hyunsook recently <a href="http://groundtruth.info/AstroStat/slog/2008/books-a-boring-title/#comment-292">said</a> that she wished that there were <em>&#8220;some astronomical data depositories where no data reduction is required but one can apply various statistical analyses to the data in the depository to learn and compare statistical methods&#8221;</em>.  With the caveat that there really is no such thing (every dataset will require case specific reduction; standard processing and reduction are inadequate in all but the simplest of cases), here is a brief list:<span id="more-364"></span></p>
<ol>
<li> The 2 Megasecond <a href="http://cxc.harvard.edu/cda/whatsnew.html#CDFS2000-2007">Chandra observations of the Southern Deep Field</a>, which have been processed, reduced, and mosaiced.  (Coincidentally, just last week Peter Freeman had asked me for a nice dataset on which to try out spatial analysis algorithms, and for which some analysis already existed for people to check their results against.  These were the data I recommended.) </li>
<li> HEASARC&#8217;s <a href="http://heasarc.gsfc.nasa.gov/W3Browse/">W3Browse</a> gives direct access to archived data from various missions.  The data products have been already processed in some standard way.</li>
<li> The Penn State Center for Astrostatistics maintains <a href="http://astrostatistics.psu.edu/datasets/index.html">training datasets</a> of various types </li>
<li> <a href="http://adc.gsfc.nasa.gov/">ADC</a>, as pointed out by <a href="http://groundtruth.info/AstroStat/slog/2008/books-a-boring-title/#comment-293">Brian</a></li>
</ol>
<p>There are many more, I am sure, and if people find any particularly good ones, please point them out in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/reduced-data/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Grating Dispersion [Equation of the Week]</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/eotw-grating-dispersion/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/eotw-grating-dispersion/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 17:00:46 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[Spectral]]></category>
		<category><![CDATA[Bragg's Law]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[diffraction]]></category>
		<category><![CDATA[dispersion]]></category>
		<category><![CDATA[EotW]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[Equation of the Week]]></category>
		<category><![CDATA[grating]]></category>
		<category><![CDATA[LETG]]></category>
		<category><![CDATA[Rowland Circle]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=315</guid>
		<description><![CDATA[High-resolution astronomical spectroscopy has invariably been carried out with gratings.  Even with the advent of the new calorimeter detectors, which can measure the energy of incoming photons to an accuracy of as low as 1 eV, gratings are still the preferred setups for hi-res work below energies of 1 keV or so.  But [...]]]></description>
			<content:encoded><![CDATA[<p>High-resolution astronomical spectroscopy has invariably been carried out with gratings.  Even with the advent of the new calorimeter detectors, which can measure the energy of incoming photons to an accuracy of as low as 1 eV, gratings are still the preferred setups for hi-res work below energies of 1 keV or so.  But how do they work?  Where are the sources of uncertainty, statistical or systematic?<br />
<span id="more-315"></span></p>
<p>The basis of dispersion is <a href="http://en.wikipedia.org/wiki/Bragg's_law">Bragg&#8217;s Law</a>, which relates the constructive interference pattern of diffraction from a regular structure to the wavelength of the incident photons.  If you have photons of wavelength &#955; incident at an angle &#952;<sub>0</sub>, going through a transmission grating (such as the <a href="http://cxc.harvard.edu/cal/Letg/">LETGS</a> or the <a href="http://space.mit.edu/ASC/calib/hetg_user.html">HETGS</a> on <a href="http://cxc.harvard.edu/">Chandra</a>) which has rulings spaced at distances <em>d</em>, the resulting diffracted photons will constructively interfere at dispersion angles &#952; such that<br />
<strong><br />
<blockquote><em>m&#955; = d (sin&#952; &#8211; sin&#952;<sub>0</sub>) &#8776; d&#948;&#952;</em></p></blockquote>
<p></strong><br />
where <em>m=0,&#177;1,&#177;2,&#8230;</em>, and for small deviations, we can approximate <em>sin&#952;&#8776;&#952;</em>.</p>
<p>Now here&#8217;s the neat trick.  If the grating is curved, then the photons incident on different parts of it will be diffracted  by different angles, and it turns out (long story, lots of geometry, perhaps another time) that (for small changes in the incident angles) these photons are brought to a focus on the opposite side of a circle whose diameter is equal to the radius of curvature <em>D</em> of the grating.  This circle is called the Rowland Circle.  If a detector is placed on the Rowland circle directly across from the grating, photons of different wavelengths will be dispersed to a focus at a lateral distance <em>Y</em> along the detector, following along the circumference of the Rowland circle:<br />
<strong><br />
<blockquote><em>Y = D (&#952; &#8211; &#952;<sub>0</sub>) = D &#948;&#952; = m&#955; D/d </em>
</p></blockquote>
<p></strong><br />
Note that for <em>m=0</em>, all the photons come to a focus at the same point <em>Y=0</em> irrespective of &#955;.  For <em>m&#8800;0</em>, the photons are dispersed to different distances depending on the dispersion order <em>m</em> and the wavelength.  Therefore, for any non-zero order, the wavelength of a photon can be estimated simply by measuring the dispersion distance <em>Y</em>:<br />
<strong><br />
<blockquote><em>&#955; = (1/mD) Y d </em>
</p></blockquote>
<p></strong><br />
Some detectors that have rudimentary intrinsic spectral resolution (like <a href="http://cxc.harvard.edu/cal/Acis/">ACIS</a>) can separate out the photons based on orders.  Others (like <a href="http://cxc.harvard.edu/cal/Hrc/">HRC</a>), will have all the orders overlapping and unseparable.  In such cases, modeling must be done carefully, using <a href="http://asc.harvard.edu/cal/Links/Letg/User/Hrc_QE/ea_index.html#rsps">response matrices that include multiple orders</a>.</p>
<p>The nominal statistical uncertainty on the estimated wavelength can be written as a combination of the measurement uncertainties in the grating periodicity <em>d</em> and the uncertainty in the photon&#8217;s position wrt the <em>0<sup>th</sup></em>-order:<br />
<strong><br />
<blockquote><em> &#948;&#955;/&#955; = &#8730;&#8254; ( (&#948;d/d)<sup>2</sup>+(&#948;Y/Y)<sup>2</sup>+(&#948;D/D)<sup>2</sup>)</em></p></blockquote>
<p></strong><br />
Generally, the uncertainties in the grating curvature <em>&#948;D</em> and in the periodicity <em>&#948;d</em> are quite negligible.  The major contributor to the wavelength uncertainty is then due to the location, which is composed of two factors &#8212; the uncertainty in registering the location on the detector that the photon is deposited (at least ~1 pixel), and the size of the astrophysical source that is being observed, which for point sources is the same as the size of the PSF.  The reciprocal of the fractional uncertainty in wavelength (or energy), <strong><em>&#955;/&#948;&#955;</em></strong>, is called the Resolving Power.  Good spectrometers in the X-ray regime nowadays reach resolving powers of thousands.</p>
<p>As an example, <a href="http://cxc.harvard.edu/proposer/POG/html/chap9.html#tth_tAb9.1">consider the Chandra LETGS</a>, which has a Rowland diameter <em>D</em>=8637 mm, and a grating period <em>d</em>=0.99125&#177;0.000086 &#956;m.  At say 100&Aring; in the 1<sup>st</sup> order (i.e., <em>m</em>=&#177;1) &#948;&#952; &#8776; &#177;0.0100883<sup>c</sup> ~ &#177;37.4 arcmin.  Then <em>Y</em>=&#177;87.1324 mm, for a plate scale of 1.148&Aring;/mm.  The HRMA on-axis PSF is approximately 5 HRC pixels (0.032 mm) wide, so the resolving power is &#8776;2700.  The simple back-of-the-envelope calculation gives results quite close to the <a href="http://cxc.harvard.edu/proposer/POG/html/chap9.html#tth_sEc9.3.3">actual values</a>.</p>
<p><strong>PS:</strong> This was originally a slide in the <a href="http://xrayschool.gsfc.nasa.gov/docs/xrayschool_2002/agrating.html">Gratings talk</a> at the <a href="http://xrayschool.gsfc.nasa.gov/docs/xrayschool_2002/schedule.html">2<sup>nd</sup> X-ray Astronomy School</a>, 2002, Berkeley Springs, WV.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/eotw-grating-dispersion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Beta Profile [Equation of the Week]</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/eotw-beta-profile/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/eotw-beta-profile/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 17:00:43 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[beta profile]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[EotW]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[Equation of the Week]]></category>
		<category><![CDATA[Line Response Function]]></category>
		<category><![CDATA[Lorentzian]]></category>
		<category><![CDATA[LRF]]></category>
		<category><![CDATA[point spread function]]></category>
		<category><![CDATA[PSF]]></category>
		<category><![CDATA[response matrix]]></category>
		<category><![CDATA[RMF]]></category>
		<category><![CDATA[XMM]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=313</guid>
		<description><![CDATA[The profiles of lines in dispersed X-ray gratings spectra are usually well approximated by the Beta profile, aka modified Lorentzian.]]></description>
			<content:encoded><![CDATA[<p>X-ray telescopes generally work by reflecting photons at grazing incidence.  As you can imagine, even small imperfections in the mirror polishing will show up as huge roadbumps to the incoming photons, and the higher their energy, the easier it is for them to scatter off their prescribed path.  So X-ray telescopes tend to have sharp peaks and fat tails compared to the much more well-behaved normal-incidence telescopes, whose PSFs (Point Spread Functions) can be better approximated as Gaussians.</p>
<p>X-ray telescopes usually also have gratings that can be inserted into the light path, so that photons of different energies get dispersed by different angles, and whose actual energies can then be inferred accurately by measuring how far away on the detector they ended up.  The accuracy of the inference is usually limited by the width of the PSF.  Thus, a major contributor to the LRF (Line Response Function) is the aforementioned scattering.</p>
<p>A correct accounting of the spread of photons of course requires a full-fledged response matrix (RMF), but as it turns out, the line profiles can be fairly well approximated with Beta profiles, which are simply Lorentzians modified by taking them to the power <em>&#946; </em> &#8211;</p>
<p><a href='http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_betaprof.jpg'><img src="http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_betaprof-300x68.jpg" alt="The Beta profile" width="300" height="68" class="aligncenter size-medium wp-image-314" /></a><br />
where B<em>(1/2,&#946;-1/2)</em> is the Beta function, and <em>N</em> is a normalization constant defined such that integrating the Beta profile over the real line gives the area under the curve as <em>N</em>.  The parameter <em>&#946;</em> controls the sharpness of the function &#8212; the higher the <em>&#946;</em>, the peakier it gets, and the more of it that gets pushed into the wings.  Chandra LRFs are usually well-modeled with <em>&#946;~2.5</em>, and XMM/RGS appears to require Lorentzians, <em>&#946;~1</em>.</p>
<p>The form of the Lorentzian may also be familiar to people as the <a href="http://en.wikipedia.org/wiki/Cauchy_distribution">Cauchy Distribution</a>, which you get for example when the ratio is taken of two quantities distributed as zero-centered Gaussians.  Note that the mean and variance are undefined for that distribution.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/eotw-beta-profile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mexican Hat [EotW]</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/eotw-mexican-hat/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/eotw-mexican-hat/#comments</comments>
		<pubDate>Wed, 28 May 2008 17:00:38 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Imaging]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[ciao]]></category>
		<category><![CDATA[convolution]]></category>
		<category><![CDATA[correlation]]></category>
		<category><![CDATA[EotW]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[Equation of the Week]]></category>
		<category><![CDATA[Fourier Transform]]></category>
		<category><![CDATA[gaussian]]></category>
		<category><![CDATA[MexHat]]></category>
		<category><![CDATA[Mexican Hat]]></category>
		<category><![CDATA[MH]]></category>
		<category><![CDATA[multiscale]]></category>
		<category><![CDATA[wavdetect]]></category>
		<category><![CDATA[wavelet]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=311</guid>
		<description><![CDATA[The most widely used tool for detecting sources in X-ray images, especially Chandra data, is the wavelet-based wavdetect, which uses the Mexican Hat (MH) wavelet.  Now, the MH is not a very popular choice among wavelet aficianados because it does not form an orthonormal basis set (i.e., scale information is not well separated), and [...]]]></description>
			<content:encoded><![CDATA[<p>The most widely used tool for detecting sources in X-ray images, especially Chandra data, is the wavelet-based <tt><a href="http://cxc.harvard.edu/ciao/download/doc/detect_manual/wav_theory.html">wavdetect</a></tt>, which uses the Mexican Hat (MH) wavelet.  Now, the MH is not a very popular choice among wavelet aficianados because it does not form an orthonormal basis set (i.e., scale information is not well separated), and does not have compact support (i.e., the function extends to inifinity).  So why is it used here?<br />
<span id="more-311"></span></p>
<p>The short answer is, it has a convenient <a href="http://groundtruth.info/AstroStat/slog/2008/eotw-background-subtraction/">background subtractor</a> built in, is analytically comprehensible, and uses concepts very familiar to astronomers.  The last bit can be seen by appealing to Gaussian smoothing.  Astronomers are (or were) used to smoothing images with Gaussians, and in a manner of speaking, all astronomical images already come presmoothed by PSFs (point spread functions) that are nominally approximated by Gaussians.  Now, if an image were smoothed by another Gaussian of a slightly larger width, the difference between the two smoothed images should highlight those features which are prominent at the spatial scale of the larger Gaussian.  This is the basic rationale behind a wavelet.</p>
<p>So, in the following, <em>G(x,y;&#963;<sub>x</sub>,&#963;<sub>y</sub>,x<sub>o</sub>,y<sub>o</sub>)</em> is a 2D Gaussian written in such that the scaling of the widths and the transposition of the function is made obvious.  It is defined over the real plane <em>x,y &#949; R<sup>2</sup></em> and for widths <em>&#963;<sub>x</sub>,&#963;<sub>y</sub></em>.  The Mexican Hat wavelet MH<em>(x,y;&#963;<sub>x</sub>,&#963;<sub>y</sub>,x<sub>o</sub>,y<sub>o</sub>)</em> is generated as the difference between the two Gaussians of different widths, which essentially boils down to taking partial derivatives of <em>G(&#963;<sub>x</sub>,&#963;<sub>y</sub>)</em> wrt the widths.  To be sure, these must really be thought of as operators where the functions are correlated with a data image, so the derivaties must be carried out inside an integral, but I am skipping all that for the sake of clarity.  Also note, the MH is sometimes derived as the second derivative of <em>G(x,y)</em>, the <em>spatial</em> derivatives that is.</p>
<p><a href='http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_mexhat.jpg'><img src="http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_mexhat-300x126.jpg" alt="Mexican Hat wavelet" width="300" height="126" class="aligncenter size-medium wp-image-312" /></a></p>
<p>The integral of the MH over <em>R<sup>2</sup></em> results in the positive bump and the negative annulus canceling each other out, so there is no unambiguous way to set its normalization.   And finally, the Fourier Transform shows which spatial scales (<em>k<sub>x,y</sub></em> are wavenumbers) are enhanced or filtered during a correlation.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/eotw-mexican-hat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Background Subtraction [EotW]</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/eotw-background-subtraction/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/eotw-background-subtraction/#comments</comments>
		<pubDate>Wed, 21 May 2008 17:00:32 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Jargon]]></category>
		<category><![CDATA[aperture photometry]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[background marginalization]]></category>
		<category><![CDATA[background subtraction]]></category>
		<category><![CDATA[celldetect]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[ciao]]></category>
		<category><![CDATA[EotW]]></category>
		<category><![CDATA[Equation]]></category>
		<category><![CDATA[error propagation]]></category>
		<category><![CDATA[ldetect]]></category>
		<category><![CDATA[local detect]]></category>
		<category><![CDATA[wavdetect]]></category>
		<category><![CDATA[X-ray]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=308</guid>
		<description><![CDATA[There is a lesson that statisticians, especially of the Bayesian persuasion, have been hammering into our skulls for ages: do not subtract background.  Nevertheless, old habits die hard, and old codes die harder.  Such is the case with X-ray aperture photometry.  
When C counts are observed in a region of the image [...]]]></description>
			<content:encoded><![CDATA[<p>There is a lesson that statisticians, especially of the Bayesian persuasion, have been hammering into our skulls for ages: <em><u>do not subtract</u> background.</em>  Nevertheless, old habits die hard, and old codes die harder.  Such is the case with X-ray aperture photometry.  <span id="more-308"></span></p>
<p>When <em>C</em> counts are observed in a region of the image that overlaps a putative source, and <em>B</em> counts in an adjacent, non-overlapping region that is mostly devoid of the source, the question that is asked is, what is the intensity of a source that might exist in the source region, given that there is also background.  Let us say that the source has intensity <em>s</em>, and the background has intensity <em>b</em> in the first region.  Further let a fraction <em>f</em> of the source overlap that region, and a fraction <em>g</em> overlap the adjacent, &#8220;background&#8221; region.  Then, if the area of the background region is <em>r</em> times larger, we can solve for <em>s</em> and <em>b</em> and even determine the errors:</p>
<p><a href='http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_bkgsub.jpg'><img src="http://groundtruth.info/AstroStat/slog/wp-content/uploads/eotw_bkgsub-300x135.jpg" alt="X-ray aperture photometry" width="300" height="135" class="aligncenter size-medium wp-image-309" /></a></p>
<p>Note that the regions do not have to be circular, nor does the source have to be centered in it.  As long as the PSF fractions <em>f</em> and <em>g</em> can be calculated, these formulae can be applied.  In practice, <em>f</em> is large, typically around 0.9, and the background region is chosen as an annulus centered on the source region, with <em>g~0</em>.  </p>
<p>It always comes as a shock to statisticians, but this is not ancient history.  We still determine maximum likelihood estimates of source intensities by subtracting out an estimated background and propagate error by the method of moments.  To be sure, astronomers are well aware that these formulae are valid only in the high counts regime <em>( s,C,B&gt;&gt;1, b&gt;0 )</em> and when the source is well defined <em>( f~1, g~0 )</em>, though of course it doesn&#8217;t stop them from pushing the envelope.  This, in fact, is the basis of many standard X-ray source detection algorithms (e.g., <tt><a href="http://cxc.harvard.edu/ciao/download/doc/detect_manual/cell_theory.html">celldetect</a></tt>).</p>
<p>Furthermore, it might come as a surprise to many astronomers, but this is also the rationale behind the widely-used wavelet-based source detection algorithm, <tt><a href="http://cxc.harvard.edu/ciao/download/doc/detect_manual/wav_theory.html">wavdetect</a></tt>.  The Mexican Hat wavelet used with it has a central positive bump, surrounded by a negative annular moat, which is a dead ringer for the source and background regions used here.  The difference is that the source intensity is not deduced from the wavelet correlations and the signal-to-noise ratio <em>( s/sigma<sub>s</sub> )</em> is not used to determine source significance, but rather extensive simulations are used to calibrate it.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/eotw-background-subtraction/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Did they, or didn&#8217;t they?</title>
		<link>http://groundtruth.info/AstroStat/slog/2008/type1a-progenitor/</link>
		<comments>http://groundtruth.info/AstroStat/slog/2008/type1a-progenitor/#comments</comments>
		<pubDate>Tue, 20 May 2008 04:10:23 +0000</pubDate>
		<dc:creator>vlk</dc:creator>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Data Processing]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Objects]]></category>
		<category><![CDATA[Optical]]></category>
		<category><![CDATA[Stat]]></category>
		<category><![CDATA[Uncertainty]]></category>
		<category><![CDATA[arXiv]]></category>
		<category><![CDATA[Chandra]]></category>
		<category><![CDATA[CXC]]></category>
		<category><![CDATA[Peter Edmonds]]></category>
		<category><![CDATA[positional coincidence]]></category>
		<category><![CDATA[positional error]]></category>
		<category><![CDATA[Power]]></category>
		<category><![CDATA[progenitor]]></category>
		<category><![CDATA[question for statisticians]]></category>
		<category><![CDATA[significance]]></category>
		<category><![CDATA[Supernova]]></category>
		<category><![CDATA[Type Ia]]></category>
		<category><![CDATA[White Dwarf]]></category>
		<category><![CDATA[White Dwarf binary]]></category>
		<category><![CDATA[X-ray]]></category>

		<guid isPermaLink="false">http://groundtruth.info/AstroStat/slog/?p=317</guid>
		<description><![CDATA[Earlier this year, Peter Edmonds showed me a press release that the Chandra folks were, at the time, considering putting out describing the possible identification of a Type Ia Supernova progenitor.  What appeared to be an accreting white dwarf binary system could be discerned in 4-year old observations, coincident with the location of a [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year, Peter Edmonds showed me a press release that the Chandra folks were, at the time, considering putting out describing the <a href="http://chandra.harvard.edu/press/08_releases/press_021308.html">possible identification of a Type Ia Supernova progenitor</a>.  What appeared to be an accreting white dwarf binary system could be discerned in 4-year old observations, coincident with the location of a supernova that went off in November 2007 (SN2007on).  An amazing discovery, but there is a hitch.</p>
<p>And it is a statistical hitch, and involves two otherwise highly reliable and oft used methods giving contradictory answers at nearly the same significance level!  Does this mean that the chances are actually 50-50?  Really, we need a bona fide statistician to take a look and point out the errors of our ways.. <span id="more-317"></span></p>
<p>The first time around, Voss &amp; Nelemans (<a href="http://arxiv.org/abs/0802.2082">arXiv:0802.2082</a>) looked at how many X-ray sources there were around the candidate progenitor of SN2007on (they also looked at 4 more galaxies that hosted Type Ia SNe and that had X-ray data taken prior to the event, but didn&#8217;t find any other candidates), and estimated the probability of chance coincidence with the optical position.  When you expect 2.2 X-ray <em>sources/arcmin<sup>2</sup> </em> near the optical source, the probability of finding one within 1.3 <em>arcsec</em> is tiny, and in fact is around 0.3%.  This result has since been reported in Nature.</p>
<p>However, Roelofs et al. (<a href="http://arxiv.org/abs/0802.2097">arXiv:0802.2097</a>) went about getting better optical positions and doing better bore-sighting, and as a result, they measured the the X-ray position accurately and also carried out Monte Carlo simulations to estimate the error on the measured location.  And they concluded that the actual separation, given the measurement error in the location, is too large to be a chance coincidence, 1.18&#177;0.27 <em>arcsec</em>.  The probability <s>that the two locations are the same</s>  of finding offsets in the observed range is ~1% [see Tom's <a href="http://groundtruth.info/AstroStat/slog/2008/type1a-progenitor/#comment-232">clarifying comment</a> below].</p>
<p>Well now, ain&#8217;t that a nice pickle?</p>
<p>To recap: there are so few X-ray sources in the vicinity of the supernova that anything close to its optical position cannot be a coincidence, <u>BUT</u>, the measured error in the position of the X-ray source is not copacetic with the optical position.  So the question for statisticians now: <em>which argument do you believe?</em>  Or is there a way to reconcile these two calculations?</p>
<p>Oh, and just to complicate matters, the X-ray source that was present 4 years ago had disappeared when looked for in December, as one would expect if it was indeed the progenitor.  But on the other hand, a lot of things can happen in 4 years, even with astronomical sources, so that doesn&#8217;t really confirm a physical link.</p>
]]></content:encoded>
			<wfw:commentRss>http://groundtruth.info/AstroStat/slog/2008/type1a-progenitor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

