{"id":421,"date":"2015-03-04T13:47:22","date_gmt":"2015-03-04T13:47:22","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=421"},"modified":"2016-02-26T13:31:12","modified_gmt":"2016-02-26T13:31:12","slug":"program-of-the-month-sfgrey","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2015\/03\/04\/program-of-the-month-sfgrey\/","title":{"rendered":"Program of the month: sfgrey"},"content":{"rendered":"<p><a href=\"\/RSF\/sfgrey.html\">sfgrey<\/a> is the <a href=\"\/blog\/2010\/04\/28\/top-ranked-programs-and-projects\/\">most widely used program<\/a> in Madagascar. It is used for plotting multidimensional images with grayscale or pseudocolor. <\/p>\n<p><strong>sfgrey<\/strong> shares many of its options with other plotting programs, such as <a href=\"\/blog\/2011\/08\/09\/program-of-the-month-sfgraph\/\">sfgraph<\/a>, <a href=\"\/blog\/2013\/06\/12\/program-of-the-month-sfwiggle\/\">sfwiggle<\/a>, and <a href=\"\/\/blog\/2011\/12\/03\/programs-of-the-month-sfcontour\/\">sfcontour<\/a>. You can look for common options by running <strong>sfdoc stdplot<\/strong> or checking out <a href=\"\/RSF\/sfstdplot.html\">stdplot documentation<\/a> online. <\/p>\n<p>Parameters that control the range of data to be displayed are <strong>clip=<\/strong>, <strong>pclip=<\/strong>, <strong>bias=<\/strong>, <strong>allpos=<\/strong>, <strong>mean=<\/strong>. The default behavior is <strong>pclip=99<\/strong>, which means that data values get clipped to the 99-nth percentile. To display values without clipping, use <strong>pclip=100<\/strong>. Setting the clip value with <strong>clip=<\/strong> takes the precedence over setting the percentage clip with <strong>pclip=<\/strong>. The <strong>bias=<\/strong> defines the data value for the middle of the color scale range, the default (appropriate for seismic data) is <strong>bias=0<\/strong>. When displaying values that are all larger than the bias value, set <strong>allpos=y<\/strong> (all positive). To set the bias to the mean value of the data without specifying it explicitly, use <strong>mean=y<\/strong>. The following example from <a href=\"\/RSF\/book\/trip\/asg\/project.html\">trip\/asg\/project<\/a> uses <strong>mean=y<\/strong> to display a synthetic model. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/trip\/asg\/project\/Fig\/bm1.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>The <strong>gpow=<\/strong> parameter applies a nonlinear scaling by taking the image to the corresponding power. If the value of <strong>gpow<\/strong> is less than zero, the appropriate value is estimated from the data. The following example from <a href=\"\/RSF\/book\/gee\/pch\/ida.html\">gee\/pch\/ida<\/a> uses the value of <strong>gpow=0.25<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/gee\/pch\/ida\/Fig\/sneps.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>If the input is a 3-D cube, sfgrey can use a particular panel (2-D slice) to estimate clip or glow. The panel is specified by <strong>gainpanel=<\/strong> and set by default to the first non-zero panel. To estimate clip using the whole cube, specify <strong>gainpanel=all<\/strong>. To clip each panel individually, use <strong>gainpanel=each<\/strong>. To add a scale bar, specify <strong>scalebar=y<\/strong>. By default, the scale bar is vertical. You can make it horizontal by using <strong>bartype=h<\/strong>. To set the minimum and maximum values on the scalebar, use <strong>minval=<\/strong> and <strong>maxval=<\/strong>. To make the scale bar run in reverse, use <strong>barreverse=y<\/strong>. The following example from <a href=\"\/RSF\/book\/tccs\/optapert\/sigsbee.html\">tccs\/optapert\/sigsbee<\/a> uses <strong>bartype=h minval=0 maxval=1<\/strong>. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/tccs\/optapert\/sigsbee\/Fig\/pimage15-mask.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>By default, <strong>sfgrey<\/strong> displays the first axis running vertical from top to bottom, which corresponds to <strong>transp=y yreverse=y<\/strong> and is a common way to display seismic data. For other kinds of data, you can modify the default behavior by setting <strong>transp=<\/strong>, <strong>xreverse=<\/strong>, and <strong>yreverse=<\/strong>. The following example from <a href=\"\/RSF\/book\/geo391\/hw5\/pocs.html\">geo391\/hw5\/pocs<\/a> displays a seismic horizon using <strong>transp=y yreverse=n<\/strong>. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/geo391\/hw5\/pocs\/Fig\/pocs.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>For an explanation of different color schemes (specified with <strong>color=<\/strong> parameter), please refer to previous posts: <\/p>\n<ul>\n<li><a href=\"\/blog\/2014\/10\/18\/tutorial-on-colormaps\/\">Tutorial on colormaps<\/a><\/li>\n<li><a href=\"\/blog\/2014\/05\/15\/light-bartlein-color-palette\/\">Light Bartlein color palette<\/a><\/li>\n<li><a href=\"\/blog\/2013\/08\/23\/cube-helix-color-palette\/\">Cube-helix color palette<\/a><\/li>\n<li><a href=\"\/blog\/2013\/03\/19\/color-palettes\/\">User-defined color palettes<\/a><\/li>\n<li><a href=\"\/blog\/2005\/03\/28\/color-schemes\/\">Standard color palettes<\/a><\/li>\n<\/ul>\n<h3 id=\"10previousprogramsofthemonth\">10 previous programs of the month:<\/h3>\n<ul>\n<li><a href=\"\/blog\/2015\/03\/01\/program-of-the-month-sfhistogram\/\">sfhistogram<\/a><\/li>\n<li><a href=\"\/blog\/2015\/01\/30\/program-of-the-month-sfmf\/\">sfmf<\/a><\/li>\n<li><a href=\"\/blog\/2014\/12\/01\/program-of-the-month-sfbin\/\">sfbin<\/a><\/li>\n<li><a href=\"\/blog\/2014\/11\/12\/program-of-the-month-sfthreshold\/\">sfthreshold<\/a><\/li>\n<li><a href=\"\/blog\/2014\/10\/08\/program-of-the-month-sfsigmoid\/\">sfsigmoid<\/a><\/li>\n<li><a href=\"\/blog\/2014\/09\/24\/program-of-the-month-sfmax1\/\">sfmax1<\/a><\/li>\n<li><a href=\"\/blog\/2014\/08\/03\/program-of-the-month-sfstolt\/\">sfstolt<\/a><\/li>\n<li><a href=\"\/blog\/2014\/07\/13\/program-of-the-month-sfltft\/\">sfltft<\/a><\/li>\n<li><a href=\"\/blog\/2014\/06\/11\/program-of-the-month-sfeikonal\/\">sfeikonal<\/a><\/li>\n<li><a href=\"blog\/2014\/05\/13\/program-of-the-month-sfhelicon\/\">sfhelicon<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>sfgrey is the most widely used program in Madagascar. It is used for plotting multidimensional images with grayscale or pseudocolor. sfgrey shares many of its options with other plotting programs, such as sfgraph, sfwiggle, and sfcontour. You can look for common options by running sfdoc stdplot or checking out stdplot documentation online. Parameters that control [&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":[3],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/421","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=421"}],"version-history":[{"count":4,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":48942,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/421\/revisions\/48942"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}