{"id":4760,"date":"2016-05-04T14:56:52","date_gmt":"2016-05-05T00:56:52","guid":{"rendered":"http:\/\/www.eaobservatory.org\/jcmt\/?page_id=4760"},"modified":"2017-02-23T09:07:08","modified_gmt":"2017-02-23T19:07:08","slug":"scuba-2-dr-tutorial-2","status":"publish","type":"page","link":"https:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-2\/","title":{"rendered":"SCUBA-2 Data Reduction \u2013 Tutorial 2"},"content":{"rendered":"<p style=\"text-align: justify\"><strong>Note:<\/strong> <em>The following tutorial instructions assume that the user has already completed <a href=\"http:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-1\/\">SCUBA-2 DR Tutorial 1<\/a>, and has the associated raw data and basic directory structure already in place.<\/em><\/p>\n<p style=\"text-align: justify\"><em>The following instructions assume that the tutorial parent directory is located in the user&#8217;s home directory, ~\/ and that the computer to be used already has a functioning installation of the latest version of the <em>Starlink<\/em> software suite (<a href=\"http:\/\/starlink.eao.hawaii.edu\/starlink\/Releases\">the latest release is available for download here<\/a>). Please also remember to run KAPPA and SMURF first.<\/em><\/p>\n<h2><em>Recpars<\/em> Files; Manually Running <em>mapmaker<\/em>; <em>dimmconfig<\/em> Files<\/h2>\n<p style=\"text-align: justify\">This tutorial demonstrates how to modify the behavior of standard reduction recipes using a Recipe Parameters <em>recpars<\/em> file, how to perform standard imaging of a <em>SCUBA-2<\/em> dataset using the makemap command, and also how to manually modify the process by specifying a different dimmconfig file.<\/p>\n<ol>\n<li style=\"text-align: justify\">\n<p>Tutorial 1 demonstrated the possibility of re-running an <em>ORAC-DR<\/em> pipeline reduction with a non-default Recipe. It is, however, also possible to supply a <em>recpars<\/em> (Recipe Parameters) plain text file that specifies the modification of some parameters for a given Recipe reduction without necessarily using a completely different recipe. Common modifications included in <em>SCUBA-2 recpars<\/em> files include changes to (e.g.) the pixel size in the final map or the <em>dimmconfig<\/em> file to be used by the recipe.<\/p>\n<p style=\"text-align: justify\">A number of pre-existing examples of <em>SCUBA-2 recpar<\/em> files can be listed by typing the following:<\/p>\n<p style=\"text-align: justify\"><code>ls $STARLINK_DIR\/bin\/oracdr\/cal\/scuba2\/recpars\/recpars-*.ini<\/code><\/p>\n<p style=\"text-align: justify\">and then using<\/p>\n<p style=\"text-align: justify\"><code>more $STARLINK_DIR\/bin\/oracdr\/cal\/scuba2\/recpars\/recpars-*.ini<\/code><\/p>\n<p style=\"text-align: justify\">to view the contents of a listed <em>recpars<\/em> file for project .<\/p>\n<p style=\"text-align: justify\">In the <em>~\/tutorial\/reduced<\/em> data directory, experiment with creating a simple <em>recpars<\/em> file and save it with the filename <em>myparams.ini<\/em> .<\/p>\n<p style=\"text-align: justify\">A starting point for your custom <em>recpars<\/em> file might be something like the following:<\/p>\n<p style=\"text-align: justify\"><code>[REDUCE_SCAN]\nMAKEMAP_CONFIG = dimmconfig_bright_extended.lis<br \/>\nMAKEMAP_PIXSIZE=3<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>Test the new <em>recpars<\/em> file by re-running the data reduction with:<\/p>\n<p style=\"text-align: justify\"><code>oracdr -loop file -files mylist -recpars myparams.ini<\/code><\/p>\n<p style=\"text-align: justify\">Feel free to experiment with the settings in the <em>recpars<\/em> file and re-run the reduction. As usual, the original reduction can be recovered by simply running the above command without the <em>-recpars myparams.ini<\/em> option.<\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>The next data reduction possibility is to manually run <em>makemap<\/em>, rather than running it via <em>ORAC-DR<\/em>. Switch to the tutorial parent directory, create a second reduced data directory (called <em>reduced2<\/em>) and switch to it:<\/p>\n<p style=\"text-align: justify\"><code>cd ~\/tutorial<br \/>\nmkdir reduced2<br \/>\ncd reduced2<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>It is necessary to provide some input parameters in order to run <em>makemap<\/em>. One of these is a list of the input files to be processed. For the purposes of this tutorial, a suitable file was already created during <a href=\"http:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-1\/\">Tutorial 1<\/a>, with the filename <em>mylist<\/em>. Copy this file into the new <em>reduced2<\/em> directory using:<\/p>\n<p style=\"text-align: justify\"><code>cp ..\/reduced\/mylist .\/<\/code><\/p>\n<p style=\"text-align: justify\">If running <em>makemap<\/em> directly, it is also necessary to specify directly which of the underlying <em>dimmconfig<\/em> files (used by the recipes) should be used. These files are also supplied as part of the standard <em>Starlink<\/em> package distribution, and can be listed by typing:<\/p>\n<p style=\"text-align: justify\"><code>ls $STARLINK_DIR\/share\/smurf\/dimmconfig*.lis<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>For the purposes of highlighting the impact the correct <em>dimmconfig<\/em> can have on data reduction, the <em>makemap<\/em> command will be run twice for this tutorial, with two contrasting <em>dimmconfig<\/em> files that are provided as part of the standard <em>Starlink<\/em> distribution. Copy two of these to the current working directory:<\/p>\n<p style=\"text-align: justify\"><code>cp $STARLINK_DIR\/share\/smurf\/dimmconfig_bright_extended.lis .\/<br \/>\ncp $STARLINK_DIR\/share\/smurf\/dimmconfig_blank_field.lis .\/<\/code><\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>Run the map-maker with the first dimmconfig file:<\/p>\n<p style=\"text-align: justify\"><code>makemap in=^mylist out=out_be.lis config=^dimmconfig_bright_extended.lis<\/code><\/p>\n<p style=\"text-align: justify\">This should produce an NDF file called <em>out_be.sdf<\/em> .<\/p>\n<div id=\"attachment_5052\" style=\"width: 304px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1.png\"><img aria-describedby=\"caption-attachment-5052\" loading=\"lazy\" src=\"http:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1-294x300.png\" alt=\"Map derived from the reduction of the SCUBA-2 tutorial data using the &quot;bright_extended&quot; dimmconfig file. \" width=\"294\" height=\"300\" class=\"size-medium wp-image-5052\" srcset=\"https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1-294x300.png 294w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1-1002x1024.png 1002w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1-147x150.png 147w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig1.png 1578w\" sizes=\"(max-width: 294px) 100vw, 294px\" \/><\/a><p id=\"caption-attachment-5052\" class=\"wp-caption-text\">Map derived from the reduction of the SCUBA-2 tutorial dataset using the &#8220;bright_extended&#8221; dimmconfig file.<\/p><\/div>\n<\/li>\n<li style=\"text-align: justify\">\n<p>For comparison, re-run the map-maker with the other <em>dimmconfig<\/em> file:<\/p>\n<p style=\"text-align: justify\"><code>makemap in=^mylist out=out_bf.lis config=^dimmconfig_blank_field.lis<\/code><\/p>\n<p style=\"text-align: justify\">This should produce an NDF file called <em>out_bf.sdf<\/em> .<\/p>\n<div id=\"attachment_5053\" style=\"width: 304px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2.png\"><img aria-describedby=\"caption-attachment-5053\" loading=\"lazy\" src=\"http:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2-294x300.png\" alt=\"Map derived from a reduction of the SCUBA-2 tutorial dataset using the &quot;blank field&quot; dimmconfig file.\" width=\"294\" height=\"300\" class=\"size-medium wp-image-5053\" srcset=\"https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2-294x300.png 294w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2-1002x1024.png 1002w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2-147x150.png 147w, https:\/\/www.eaobservatory.org\/jcmt\/wp-content\/uploads\/sites\/2\/2016\/05\/SCUBA-2_DR_tutorial2_fig2.png 1578w\" sizes=\"(max-width: 294px) 100vw, 294px\" \/><\/a><p id=\"caption-attachment-5053\" class=\"wp-caption-text\">Map derived from the reduction of the SCUBA-2 tutorial dataset using the &#8220;blank field&#8221; dimmconfig file.<\/p><\/div>\n<\/li>\n<li style=\"text-align: justify\">\n<p>Try examining both <em>out_be.sdf<\/em> and <em>out_bf.sdf<\/em> in <em>Gaia<\/em> using the techniques described in <a href=\"http:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-1\/\">Tutorial 1<\/a>. It should be immediately clear which of the two <em>dimmconfig<\/em> files is the more suitable for the type of observations used in these tutorials. As noted in <a href=\"http:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-1\/\">Tutorial 1<\/a>, the default Recipe for the example dataset is <em>REDUCE_SCAN<\/em>, which uses the <em>dimmconfig<\/em> file <em>dimmconfig_jsa_generic.lis<\/em> as its default for science targets.<\/p>\n<\/li>\n<li style=\"text-align: justify\">\n<p>Feel free to try re-running the process with other standard <em>dimmconfig<\/em> files. For interest, you may also wish to compare and contrast the contents of these files.<\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<p style=\"text-align: center\"><strong><a 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 SCUBA-2 DR Tutorial 1, and has the associated raw data and basic directory structure already in place. The following instructions assume that the tutorial parent directory is located in the user&#8217;s home directory, ~\/ and that the computer\u2026 <a class=\"continue-reading-link\" href=\"https:\/\/www.eaobservatory.org\/jcmt\/science\/reductionanalysis-tutorials\/scuba-2-dr-tutorial-2\/\">Continue reading<\/a><\/p>\n","protected":false},"author":41,"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\/4760"}],"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\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/comments?post=4760"}],"version-history":[{"count":35,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/4760\/revisions"}],"predecessor-version":[{"id":6664,"href":"https:\/\/www.eaobservatory.org\/jcmt\/wp-json\/wp\/v2\/pages\/4760\/revisions\/6664"}],"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=4760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}