{"id":257,"date":"2020-05-03T17:44:30","date_gmt":"2020-05-03T08:44:30","guid":{"rendered":"https:\/\/shibaura-it.tokyo\/it-solution\/?p=257"},"modified":"2020-05-03T20:23:29","modified_gmt":"2020-05-03T11:23:29","slug":"257-2","status":"publish","type":"post","link":"https:\/\/shibaura-it.tokyo\/it-solution\/257-2\/","title":{"rendered":"asammdf\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>Python\u306b\u306f\u3001asammdf\u3068\u3044\u3046mf4\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3048\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>MF4\u30c7\u30fc\u30bf\u3092Python\u3067\u3001\u3057\u304b\u3082\u8efd\u91cf\u3067\u3001\u6bd4\u8f03\u7684\u9ad8\u901f\u3067\u53d6\u308a\u6271\u3048\u308b\u306e\u3067\u975e\u5e38\u306b\u6709\u7528\u306a\u306e\u3067\u3059\u304c\u3001\u65e5\u672c\u8a9e\u3092\u542b\u3081\u53d6\u308a\u6271\u308f\u308c\u3066\u3044\u308b\u30b5\u30a4\u30c8\u304c\u5c11\u306a\u304f\u3001<br \/>\n\u5c11\u306a\u304f\u3068\u3082\u30d3\u30ae\u30ca\u30fc\u5411\u3051\u306e\u30b5\u30a4\u30c8\u306f\u7686\u7121\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u3061\u3089\u3067\u5c11\u3057\u305a\u3064\u89e3\u8aac\u3057\u3066\u884c\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001Python\u30b3\u30fc\u30c9\u306b\u3088\u308aMF4\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from asammdf import MDF, Signal\r\nimport numpy as np\r\n\r\n# create Sample Signal objects\r\n# Timestamp\r\ntimestamps = np.array([0.1, 0.2, 0.3, 0.4, 0.5], dtype=np.float32)\r\n\r\n# float64 Data\r\ns_float64 = Signal(samples=np.array([20.1, -10.2, 0.3, -5.4, 10.5], dtype=np.float64),\\\r\n    timestamps=timestamps,\\\r\n    name = 'f64_Sample',\\\r\n    unit = 'm\/s')\r\n\r\nwith MDF(version='4.10') as mdf4:\r\n    # append the 3 signals to the new file\r\n    signals = [s_float64]\r\n    mdf4.append(signals, 'Created by Python')\r\n\r\n    # save new file\r\n    mdf4.save('Min_Test.mf4', overwrite=True)\r\n\r\n    mdf4.get('f64_Sample').plot()<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u30010.1sec\u5468\u671f\u30670.1 &#8211; 0.5 sec\u9593\u306e\u6e2c\u5b9a\u6642\u9593(TimeStamp)\u306b\u3001\u8a08\u6e2c\u4fe1\u53f7&#8221;f64_Sample&#8221; \u304c\u300120.1 =&gt; -10.2 =&gt; 0.3 =&gt; -5.4 =&gt; 10.5\u3068\u3001<br \/>\n\u5909\u4f4d\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/shibaura-it.tokyo\/it-solution\/wp\/wp-content\/uploads\/2020\/05\/2020-05-03_20h20_50.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-262\" src=\"https:\/\/shibaura-it.tokyo\/it-solution\/wp\/wp-content\/uploads\/2020\/05\/2020-05-03_20h20_50.jpg\" alt=\"\" width=\"1024\" height=\"616\" srcset=\"https:\/\/shibaura-it.tokyo\/it-solution\/wp\/wp-content\/uploads\/2020\/05\/2020-05-03_20h20_50.jpg 1024w, https:\/\/shibaura-it.tokyo\/it-solution\/wp\/wp-content\/uploads\/2020\/05\/2020-05-03_20h20_50-600x361.jpg 600w, https:\/\/shibaura-it.tokyo\/it-solution\/wp\/wp-content\/uploads\/2020\/05\/2020-05-03_20h20_50-768x462.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u306b\u306f\u3001asammdf\u3068\u3044\u3046mf4\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3048\u308b\u30e9\u30a4\u30d6&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/posts\/257"}],"collection":[{"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":5,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":259,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/posts\/257\/revisions\/259"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/media\/242"}],"wp:attachment":[{"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shibaura-it.tokyo\/it-solution\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}