{"id":5253,"date":"2016-07-18T14:04:03","date_gmt":"2016-07-19T00:04:03","guid":{"rendered":"http:\/\/www.eaobservatory.org\/jcmt\/?page_id=5253"},"modified":"2020-11-24T14:03:08","modified_gmt":"2020-11-25T00:03:08","slug":"heterodyne-instrument-data-reduction-tutorial-2","status":"publish","type":"page","link":"https:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/heterodyne-instrument-data-reduction-tutorial-2\/","title":{"rendered":"Heterodyne Instrument Data Reduction Tutorial 2"},"content":{"rendered":"<p><strong>Note:<\/strong> <em>The following tutorial instructions assume that the user has already completed HARP DR Tutorial 1, and has the associated raw data and basic directory structure already in place.<\/em><\/p>\n<p style=\"text-align: justify\"><em>This tutorial also assumes that the computer to be used already has a functioning installation of a recent version of the Starlink software suite (<a href=\"http:\/\/starlink.eao.hawaii.edu\/starlink\/Releases\">the latest release is available for download here<\/a>).<\/em><\/p>\n<h2 style=\"text-align: justify\">Additional reduction\/analysis instructions<\/h2>\n<p style=\"text-align: justify\">This tutorial demonstrates how to determine what reduction recipe was run on your data if you send it through the default reduction. How to specify a different reduction recipe. How to apply an efficiency correction to your data (converting your data to T<sub>MB<\/sub> or T<sub>R<\/sub>*):<\/p>\n<ol>\n<li style=\"text-align: justify\">Each ACSIS science observation includes the specification of a default data reduction recipe in the header information. This is originally set by selecting a <em>RECIPE<\/em> option in the Observing Tool (OT) during MSB preparation. To determine the default recipe for a given dataset, switch to the raw data directory:\n<p style=\"text-align: justify\"><code>cd data\/<\/code><\/p>\n<p style=\"text-align: justify\">Use either of the following to examine the relevant part of the FITS header component of the data:<\/p>\n<p style=\"text-align: justify\"><code>fitsval a20110103_00025_01_0001.sdf RECIPE<\/code><\/p>\n<p style=\"text-align: justify\">or<\/p>\n<p style=\"text-align: justify\"><code>fitslist a20110103_00025_01_0001.sdf | grep RECIPE<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">It is also possible to re-run the pipeline reduction process using a different <a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260.html\">recipe<\/a> from the default specified in the FITS header by simply appending the name of the recipe to the command line instruction. To try this, switch to the reduced data directory and try re-running the pipeline reduction with a different recipe:\n<p style=\"text-align: justify\"><code>cd ..\/reduced\/<br \/>\noracdr -files mylist -nodisplay -log sf REDUCE_SCIENCE_NARROWLINE<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">Try doing the same with the other data. Note that the wide-band observation has two raw data files.\n<p style=\"text-align: justify\">Relevant recipe names are:<\/p>\n<p style=\"text-align: justify\"><code><a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260ss18.html#Q1-28-73\">REDUCE_SCIENCE_NARROWLINE<\/a><br \/>\n<a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260ss14.html#Q1-24-61\"> REDUCE_SCIENCE_BROADLINE<\/a><br \/>\n<a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260ss19.html#Q1-29-76\"> REDUCE_SCIENCE_GRADIENT<\/a><br \/>\n<a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260ss22.html#Q1-32-85\"> REDUCE_SCIENCE_LINEFOREST<\/a><br \/>\n<a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun260.htx\/sun260ss15.html#Q1-25-64\"> REDUCE_SCIENCE_CONTINUUM<\/a><\/code><\/p>\n<p style=\"text-align: justify\">Experiment to find out how the results of the reduction of a certain data file vary using the different recipes.<\/p>\n<\/li>\n<li style=\"text-align: justify\">It is possible to go and &#8220;tweak&#8221; a reduction by specifying your own recipe parameters. This is done by providing the pipeline with your own parameters for use with the specified recipe. For example you could make the following recipe file (called here <em>myparams.ini<\/em>) containing:\n<p style=\"text-align: justify\"><code>[REDUCE_SCIENCE_NARROWLINE]\nPIXEL_SCALE=4<br \/>\nREBIN=1<\/code><\/p>\n<p style=\"text-align: justify\">Then run the pipeline as follows:<\/p>\n<p style=\"text-align: justify\"><code>oracdr -files\u00a0mylist -nodisplay -log sf -recpars myparams.ini REDUCE_SCIENCE_NARROWLINE<br \/>\n<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">Once your data have been reduced it is possible to convert your data to T<sub>MB<\/sub> or T<sub>R<\/sub>*. To do so you will need to take into account <span id=\"MathJax-Element-8-Frame\" class=\"MathJax\"><span id=\"MathJax-Span-39\" class=\"math\"><span id=\"MathJax-Span-40\" class=\"mrow\"><span id=\"MathJax-Span-41\" class=\"msub\"><span id=\"MathJax-Span-42\" class=\"mrow\"><span id=\"MathJax-Span-43\" class=\"mi\">\u03b7<\/span><\/span><sub><span id=\"MathJax-Span-44\" class=\"mrow\"><span id=\"MathJax-Span-45\" class=\"mstyle text\"><span id=\"MathJax-Span-46\" class=\"mrow\"><span id=\"MathJax-Span-47\" class=\"mtext\">MB<\/span><\/span><\/span><\/span><\/sub><\/span><\/span><\/span><\/span> and <span id=\"MathJax-Element-8-Frame\" class=\"MathJax\"><span id=\"MathJax-Span-39\" class=\"math\"><span id=\"MathJax-Span-40\" class=\"mrow\"><span id=\"MathJax-Span-41\" class=\"msub\"><span id=\"MathJax-Span-42\" class=\"mrow\"><span id=\"MathJax-Span-43\" class=\"mi\">\u03b7<\/span><\/span><sub><span id=\"MathJax-Span-44\" class=\"mrow\"><span id=\"MathJax-Span-45\" class=\"mstyle text\"><span id=\"MathJax-Span-46\" class=\"mrow\"><span id=\"MathJax-Span-47\" class=\"mtext\">fss <\/span><\/span><\/span><\/span><\/sub><\/span><\/span><\/span><\/span> i.e:\n<p style=\"text-align: justify\"><code>cdiv in=file.sdf scalar=0.63\u00a0out=file_Tmb<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">It is possible to create channel maps of your data using <a href=\"http:\/\/starlink.eao.hawaii.edu\/devdocs\/sc20.htx\/sc20ch9.html#x10-800004\">chanmap<\/a> command (note this does not make too much sense for stare observations):\n<p style=\"text-align: justify\"><code>chanmap\u00a0in=cube\u00a0axis=3\u00a0low=-10\u00a0high=5\u00a0nchan=6\u00a0shape=3\u00a0estimator=mean<\/code><\/p>\n<p style=\"text-align: justify\">It is also possible to produce channel maps using GAIA. You might also wish to look at a smaller velocity range than is contained within the cube when making such maps (in the following I make the assumption that the line is found between pixels -5 and 15 in the velocity axis):<\/p>\n<p style=\"text-align: justify\"><code>chanmap\u00a0in=\\\"cube\\(::-5:15\\)\\\" axis=3\u00a0low=-10\u00a0high=5\u00a0nchan=6\u00a0shape=3\u00a0estimator=mean<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">It is possible to create position-velocity diagrams from your data using the <a href=\"http:\/\/starlink.eao.hawaii.edu\/devdocs\/sc20.htx\/sc20ch9.html#x10-790003\">collapse<\/a> command:\n<p style=\"text-align: justify\"><code>collapse\u00a0in=reduced.sdf\u00a0axis=skylat\u00a0estimator=sum\u00a0out=pv<\/code><\/p>\n<p style=\"text-align: justify\">Again it is also possible to do this in GAIA.<\/p>\n<\/li>\n<li style=\"text-align: justify\">Clump finding has many uses (and can form a topic for discussion on its own &#8211; see this <a href=\"https:\/\/uhra.herts.ac.uk\/bitstream\/handle\/2299\/13228\/Mark%20Watson%20-%20final%20MSc%20by%20Research%20submission.pdf?sequence=1\">Master Thesis<\/a> by M. Watson for further discussion), the two popular clump finding algorithms in the Starlink software suite are: <a href=\"http:\/\/adsabs.harvard.edu\/abs\/1994ApJ...428..693W\">clumpfind<\/a> and <a href=\"http:\/\/adsabs.harvard.edu\/abs\/2015A%26C....10...22B\">fellwalker<\/a>.\u00a0 These are <a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun255.htx\/sun255.html\">CUPID<\/a> packages and so to run you will need to have run up CUPID before you begin:\n<p style=\"text-align: justify\"><code>cupid<\/code><\/p>\n<p style=\"text-align: justify\">Then run the <a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun255.htx\/sun255ss5.html#Q1-11-38\">findclumps<\/a> command:<\/p>\n<p style=\"text-align: justify\"><code>findclumps in=file.sdf out=clump-file.sdf outcat=clump-cat.FIT<\/code><\/p>\n<p style=\"text-align: justify\">To run with bespoke parameters (as outlines in the <a href=\"http:\/\/starlink.eao.hawaii.edu\/docs\/sun255.htx\/sun255ss5.html#Q1-11-38\">findclumps documentation<\/a>) you will need to create a configuration file such as the following <em>config.lis<\/em>:<\/p>\n<p style=\"text-align: justify\"><code>ClumpFind.AllowEdge = 0<br \/>\nCLUMPFIND.TLOW=5*RMS<br \/>\nClumpFind.MinPix=16<br \/>\nClumpFind.VeloRes=1<br \/>\nCLUMPFIND.DELTAT=3*RMS<\/code><\/p>\n<p style=\"text-align: justify\">Then execute the command findclumps with:<\/p>\n<p style=\"text-align: justify\"><code>findclumps in=file.sdf out=clump-file.sdf outcat=clump-cat.FIT config=^config.lis<br \/>\n<\/code><\/p>\n<p style=\"text-align: justify\">To examine the clumps identify open the <em>clump-file.sdf<\/em> in GAIA. To examine the properties of the clumps as reported in the <em>clump-cat.FIT<\/em> file you can open the file in topcat:<\/p>\n<p style=\"text-align: justify\"><code>topcat -f fits clump-cat.FIT<br \/>\n<\/code><\/p>\n<p style=\"text-align: justify\">\n<\/li>\n<\/ol>\n<hr \/>\n<p style=\"text-align: center\"><strong><a style=\"text-align: justify\" href=\"http:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/\">Other JCMT data reduction\/analysis tutorials are available here.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: The following tutorial instructions assume that the user has already completed HARP DR Tutorial 1, and has the associated raw data and basic directory structure already in place. This tutorial also assumes that the computer to be used already has a functioning installation of a recent version of the\u2026 <a class=\"continue-reading-link\" href=\"https:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/heterodyne-instrument-data-reduction-tutorial-2\/\">Continue reading<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"parent":4510,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/5253"}],"collection":[{"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/comments?post=5253"}],"version-history":[{"count":18,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/5253\/revisions"}],"predecessor-version":[{"id":11537,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/5253\/revisions\/11537"}],"up":[{"embeddable":true,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/4510"}],"wp:attachment":[{"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/media?parent=5253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}