{"id":448,"date":"2015-06-10T15:54:48","date_gmt":"2015-06-10T15:54:48","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=448"},"modified":"2015-10-14T18:04:04","modified_gmt":"2015-10-14T18:04:04","slug":"program-of-the-month-sfintbin","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2015\/06\/10\/program-of-the-month-sfintbin\/","title":{"rendered":"Program of the month: sfintbin"},"content":{"rendered":"<p><a href=\"\/RSF\/sfintbin.html\">sfintbin<\/a> uses trace headers to arrange input traces in a 3-D cube. <\/p>\n<p>The input to this program typically comes from reading a SEGY file with <a href=\"\/RSF\/sfsegyread.html\">sfsegyread<\/a>.<\/p>\n<p>The following example from <a href=\"\/RSF\/book\/tccs\/phase\/boon3.html\">tccs\/phase\/boon3<\/a> shows a typical output:<\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/tccs\/phase\/boon3\/Fig\/boon3.png\" alt=\"\" title=\"\" \/><\/p>\n<p><strong>sfintbin<\/strong> takes as an input a 2-D trace file and its corresponding trace header file (specified by <strong>head=<\/strong>). The header file is assumed to contain integer values. The output 3-D cube is generated according to trace header keys, which can be specified by name (<strong>xk=<\/strong>, <strong>yk=<\/strong>) or by number (<strong>xkey=<\/strong>, <strong>ykey=<\/strong>). In the example above, the parameters are <strong>xk=cdp<\/strong> and <strong>yk=fldr<\/strong>. If you are unsure which keys to use, try <a href=\"\/RSF\/sfheaderattr.html\">sfheaderattr<\/a>. The range of values can be controlled with <strong>xmin=<\/strong>, <strong>xmax=<\/strong>, <strong>ymin=<\/strong>, <strong>ymax=<\/strong>.<\/p>\n<p><strong>sfintbin<\/strong> performs a very simple operation: it goes through the input file and assigns traces to the output according to their header keys. If there are several traces with the same x and y keys, the last one survives. If there are bins in the output with no input, they are filled with zeros. You can output the mask of empty traces using <strong>mask=<\/strong>. You can output the mapping of traces using <strong>map=<\/strong>. The latter is particularly useful for the inverse operation (mapping from 3-D back to 2-D), which can be performed with <strong>inv=y<\/strong>.<\/p>\n<p>For an absent trace header key, which corresponds to a trace number in a gather, you can set <strong>xkey=<\/strong> to a negative number. For this to work, the input needs to be sorted in the corresponding gathers, which can be accomplished with <a href=\"\/RSF\/sfheadersort.html\">sfheadersort<\/a>.<\/p>\n<p>To produce a 4-D output (for example, a set of gathers in 3-D), try <a href=\"\/RSF\/sfintbin3.html\">sfintbin3<\/a>.<\/p>\n<h3 id=\"10previousprogramsofthemonth\">10 previous programs of the month:<\/h3>\n<ul>\n<li><a href=\"\/blog\/2015\/05\/01\/program-of-the-month-sfbox\/\">sfbox<\/a><\/li>\n<li><a href=\"\/blog\/2015\/04\/21\/program-of-the-month-sfslant\/\">sfslant<\/a><\/li>\n<li><a href=\"\/blog\/2015\/03\/04\/program-of-the-month-sfgrey\/\">sfgrey<\/a><\/li>\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<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>sfintbin uses trace headers to arrange input traces in a 3-D cube. The input to this program typically comes from reading a SEGY file with sfsegyread. The following example from tccs\/phase\/boon3 shows a typical output: sfintbin takes as an input a 2-D trace file and its corresponding trace header file (specified by head=). The header [&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":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-celebration"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/448","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=448"}],"version-history":[{"count":6,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/448\/revisions"}],"predecessor-version":[{"id":24120,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/448\/revisions\/24120"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}