{"id":48954,"date":"2016-03-23T21:56:03","date_gmt":"2016-03-23T21:56:03","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=48954"},"modified":"2016-03-23T21:56:03","modified_gmt":"2016-03-23T21:56:03","slug":"program-of-the-month-sflinear","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2016\/03\/23\/program-of-the-month-sflinear\/","title":{"rendered":"Program of the month: sflinear"},"content":{"rendered":"<p><a href=\"\/RSF\/sflinear.html\">sflinear<\/a> performs 1-D linear interpolation of irregularly spaced data.<\/p>\n<p>The following example from <a href=\"\/RSF\/book\/rsf\/su\/rsflab4.html\">rsf\/su\/rsflab4<\/a> shows a linearly interpolated velocity profile:<\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/rsf\/su\/rsflab4\/Fig\/vel.png\" alt=\"\" title=\"\" \/><\/p>\n<p>The input to <strong>sflinear<\/strong> contains coordinate-value pairs arranged so that the second dimension of the data is <strong>n2=2<\/strong>. The output contains regularly sampled values on the specified grid. <\/p>\n<p>If the input coordinates are not in order and need sorting, use <strong>sort=y<\/strong>.<\/p>\n<p>The output grid can be specified either by supplying it in a pattern file <strong>pattern=<\/strong> or by specifying the usual parameters <strong>n1=<\/strong>, <strong>o1=<\/strong>, <strong>d1=<\/strong>. <\/p>\n<p>If the number of iterations specified by <strong>niter=<\/strong> is greater than zero, <strong>sflinear<\/strong> switches from simple linear interpolation to iterative interpolation by shaping regularization, which can produce a smooth output. The additional parameters to control this process are <strong>nw=<\/strong> (size of the local Lagrange interpolation filter for forward interpolation) and <strong>rect=<\/strong> (smoothing radius for shaping).<\/p>\n<h3 id=\"10previousprogramsofthemonth\">10 previous programs of the month:<\/h3>\n<ul>\n<li><a href=\"\/blog\/2016\/02\/18\/program-of-the-month-sfmig2\/\">sfmig2<\/a><\/li>\n<li><a href=\"\/blog\/2016\/01\/16\/program-of-the-month-sfsort\/\">sfsort<\/a><\/li>\n<li><a href=\"\/blog\/2015\/12\/22\/program-of-the-month-sfdivn\/\">sfdivn<\/a><\/li>\n<li><a href=\"\/blog\/2015\/11\/16\/program-of-the-month-sfpldb-and-sfplas\/\">sfpldb and sfplas<\/a><\/li>\n<li><a href=\"\/blog\/2015\/10\/15\/program-of-the-month-sfisolr2\/\">sfisolr2<\/a><\/li>\n<li><a href=\"\/blog\/2015\/09\/14\/program-of-the-month-sfsimilarity\/\">sfsimilarity<\/a><\/li>\n<li><a href=\"\/blog\/2015\/07\/10\/program-of-the-month-sfmutter\/\">sfmutter<\/a><\/li>\n<li><a href=\"\/blog\/2015\/06\/10\/program-of-the-month-sfintbin\/\">sfintbin<\/a><\/li>\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<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>sflinear performs 1-D linear interpolation of irregularly spaced data. The following example from rsf\/su\/rsflab4 shows a linearly interpolated velocity profile: The input to sflinear contains coordinate-value pairs arranged so that the second dimension of the data is n2=2. The output contains regularly sampled values on the specified grid. If the input coordinates are not in [&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-48954","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/48954","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=48954"}],"version-history":[{"count":4,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/48954\/revisions"}],"predecessor-version":[{"id":49098,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/48954\/revisions\/49098"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=48954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=48954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=48954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}