{"id":129,"date":"2007-02-15T07:02:21","date_gmt":"2007-02-15T07:02:21","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=129"},"modified":"2015-08-04T23:51:44","modified_gmt":"2015-08-04T23:51:44","slug":"how-to-make-rsf-files-easy-to-fetch-from-ftp-servers","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2007\/02\/15\/how-to-make-rsf-files-easy-to-fetch-from-ftp-servers\/","title":{"rendered":"How to make RSF files easy to fetch from FTP servers?"},"content":{"rendered":"<p>An RSF &#8220;file&#8221; typically consists of 2 parts: the binary file, where data values are stored, and the header file (text), where data attributes are put (see <a href=\"https:\/\/reproducibility.org\/wiki\/Guide_to_RSF_file_format#Header_and_Data_files\" >RSF file format page<\/a> for more details). To prepare such file for distribution, it is recommended to 1) make the binary part architecture independent so that data can be downloaded on heterogeneous computer systems, and 2) pack the binary and header parts. Such result is achieved by using the <a href=\"http:\/\/www.reproducibility.org\/RSF\/sfdd.html\" >sfdd<\/a> program to convert the binary part to <a href=\"http:\/\/en.wikipedia.org\/wiki\/External_Data_Representation\" >XDR<\/a> format and, at the same time, to pack the two parts. See the example below.<\/p>\n<p><!--more--><br \/>\n<br \/>\nExample:<\/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 >\nbash$ sfspike n1=100 n2=100 &gt;myfile.rsf\nbash$ sfin myfile.rsf\nmyfile.rsf:\nin=\"\/tmp\/myfile.rsf@\"\nesize=4 type=float form=native\nn1=100         d1=0.004       o1=0          label1=\"Time\" unit1=\"s\"\nn2=100         d2=0.1           o2=0          label2=\"Distance\" unit2=\"km\"\n10000 elements 40000 bytes<\/pre><\/div>\n<p>The binary part of myfile.rsf is in the DATAPATH, i.e. \/tmp, and format is native. To make myfile.rsf easy to fetch from your FTP server, run the following command<\/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 >\nbash$ &lt;myfile.rsf sfdd form=xdr out=stdout &gt;xdr_packed_file.rsf\nbash$ sfin xdr_packed_file.rsf\nxdr_packed_file.rsf:\nin=\"stdin\"\nesize=4 type=float form=xdr\nn1=100         d1=0.004       o1=0          label1=\"Time\" unit1=\"s\"\nn2=100         d2=0.1           o2=0          label2=\"Distance\" unit2=\"km\"\n10000 elements 40000 bytes\n<\/pre><\/div>\n<p>The file is now packed, i.e. in=&#8221;stdin&#8221;, and format is xdr. It is ready to go!<br \/>\nOn the receiver side, i.e. computer which fetches this xdr_packed_file.rsf from your FTP server, it is recommended to start by unpacking and converting to native format the file before manipulating the data. This operation is also done using the <a href=\"\/RSF\/sfdd.html\" >sfdd<\/a> program. The command is<\/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 >\nbash$ &lt;xdr_packed_file.rsf sfdd form=native &gt;myfile.rsf<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>An RSF &#8220;file&#8221; typically consists of 2 parts: the binary file, where data values are stored, and the header file (text), where data attributes are put (see RSF file format page for more details). To prepare such file for distribution, it is recommended to 1) make the binary part architecture independent so that data can [&hellip;]<\/p>\n","protected":false},"author":5,"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":[4],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-faq"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/129","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":1,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":786,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions\/786"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}