{"id":231,"date":"2010-08-17T18:29:22","date_gmt":"2010-08-17T18:29:22","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=231"},"modified":"2015-09-10T20:30:56","modified_gmt":"2015-09-10T20:30:56","slug":"madagascar-for-users-of-seismic-unix","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2010\/08\/17\/madagascar-for-users-of-seismic-unix\/","title":{"rendered":"Madagascar for users of Seismic Unix"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/a\/a0\/Seismic_Velocity_Analysis.png\/150px-Seismic_Velocity_Analysis.png\" align=\"right\" \/> <a href=\"http:\/\/en.wikipedia.org\/wiki\/Seismic_Unix\">Seismic Unix<\/a> (SU) is a famous open-source seismic processing package maintained by <a href=\"http:\/\/www.cwp.mines.edu\/~john\/\">John Stockwell<\/a> at the Center for Wave Phenomena, Colorado School of Mines. <\/p>\n<p>SU has been around for 25 years and has attracted many devoted users. If you are one of them, please consider the following: <\/p>\n<ul>\n<li>Using Seismic Unix is not an excuse for non-reproducible computational experiments. To facilitate reproducibility, you can use Python and SCons with the <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/framework\/rsf\/suproj.py\">rsf.suproj<\/a> module supplied by Madagascar. The <a href=\"https:\/\/github.com\/ahay\/src\/tree\/master\/book\/rsf\/su\">book\/rsf\/su<\/a> directory contains many examples of seismic data processing flows using SU and their loose translation to Madagascar analogs. Here is an example <tt>SConstruct<\/tt> script from <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/book\/rsf\/su\/sulab1\/SConstruct\">rsf\/su\/sulab1<\/a><\/li>\n<\/ul>\n<div class=\"code-box\"><div class=\"code-title\"><i class=\"fa fa-code\"><\/i> <div class=\"pull-right\"><a href=\"#\" class=\"btn btn-default btn-xs toggle-code\" data-toggle=\"tooltip\" title=\"Toggle code\"><i class=\"fa fa-toggle-up\"><\/i><\/a><\/div><\/div><pre ><code class=\"python\">from rsf.suproj import *\n\nFlow('plane',None,'suplane')\nResult('plane','suxwigb label1=\"Time (s)\" label2=Trace')\n\nFlow('specfx','plane','suspecfx')\nResult('specfx','suxwigb label1=\"Frequency (Hz)\" label2=Trace')\n\nEnd()\n<\/code><\/pre><\/div>\n<p>Its loose Madagascar translation is in <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/book\/rsf\/su\/rsflab1\/SConstruct\">rsf\/su\/rsflab1<\/a><\/p>\n<div class=\"code-box\"><div class=\"code-title\"><i class=\"fa fa-code\"><\/i> <div class=\"pull-right\"><a href=\"#\" class=\"btn btn-default btn-xs toggle-code\" data-toggle=\"tooltip\" title=\"Toggle code\"><i class=\"fa fa-toggle-up\"><\/i><\/a><\/div><\/div><pre ><code class=\"python\">from rsf.proj import *\n\nFlow('plane',None,\n     '''\n     spike n1=64 n2=32 d2=1 o2=1 label2=Trace unit2=\n     nsp=3 k1=8,20,32 k2=4 l2=28 p2=2,1,0 \n     ''')\nFlow('specfx','plane','spectra | scale axis=2')\n\nfor plot in ('plane','specfx'):\n    Plot(plot,\n         '''\n         wiggle clip=1 transp=y yreverse=y poly=y\n         wanttitle=n wheretitle=b wherexlabel=t\n         ''')\n\nResult('specfx','plane specfx','SideBySideAniso')\n\nEnd()\n<\/code><\/pre><\/div>\n<p>If you want only <strong>rsf.suproj<\/strong> but not the rest of Madagascar, <a href=\"http:\/\/sourceforge.net\/projects\/rsf\/files\/madagascar\/madagascar-1.5\/madagascar-framework-1.5-1.tar.gz\/download\">download<\/a> <strong>madagascar-framework<\/strong> package from SourceForge.<\/p>\n<ul>\n<li>\n<p>It is also possible to convert between SU and RSF file formats with <strong>sfsuread<\/strong> and <strong>sfsuwrite<\/strong> and to combine SU and Madagascar programs in common processing flows.<\/p>\n<\/li>\n<li>\n<p>If you decide to switch to Madagascar but are missing certain functionality from Seismic Unix, it is possible and legal to borrow code from SU and to add it to Madagascar. The opposite is not true, because the <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/COPYING.txt\">Madagascar license<\/a> (GPL) is more restrictive than the <a href=\"http:\/\/www.cwp.mines.edu\/cwpcodes\/LEGAL_STATEMENT\">SU license<\/a> (BSD-like). The <a href=\"https:\/\/github.com\/ahay\/src\/tree\/master\/su\">su<\/a> directory contains some of the codes Madagascar has borrowed from SU by requests of the users. Naturally, we try to limit such borrowing to avoid unnecessary forks.<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" src=\"http:\/\/www.cwp.mines.edu\/~john\/Gif\/jws_sm_web.gif\" align=\"right\" \/> In a <a href=\"https:\/\/mailman.mines.edu\/pipermail\/seisunix\/2010-July\/000632.html\">recent message<\/a> to the Seismic Unix mailing list, John Stockwell described a proposal for <strong>S3<\/strong>, the third generation SU. The main requirements for S3 are: <\/p>\n<ol>\n<li>a new project managed on SourceForge<\/li>\n<li>GPL license<\/li>\n<li>flexible trace headers<\/li>\n<li>integration with scientific libraries<\/li>\n<li>integration with the current SU as well as other GPL- or BSD-licensed packages<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>One cannot help thinking that the project that John describes is Madagascar!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seismic Unix (SU) is a famous open-source seismic processing package maintained by John Stockwell at the Center for Wave Phenomena, Colorado School of Mines. SU has been around for 25 years and has attracted many devoted users. If you are one of them, please consider the following: Using Seismic Unix is not an excuse for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"local","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-231","post","type-post","status-publish","format-standard","hentry","category-systems"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":3,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":22613,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/231\/revisions\/22613"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}