{"id":88,"date":"2022-11-10T13:54:05","date_gmt":"2022-11-10T12:54:05","guid":{"rendered":"https:\/\/www.ephyswiki.org\/?post_type=yada_wiki&#038;p=88"},"modified":"2022-11-10T13:54:05","modified_gmt":"2022-11-10T12:54:05","slug":"spikeglx-fetch","status":"publish","type":"yada_wiki","link":"https:\/\/www.ephyswiki.org\/?yada_wiki=spikeglx-fetch","title":{"rendered":"SpikeGLX &#8211; Fetch()"},"content":{"rendered":"<p>One thing I learned the hard way: when using SpikeGLX\u2019s matlab API, the function Fetch() does not return channels in the order you requested them. For example, let\u2019s say we do:<\/p>\n<p>[matDataNI,intStartCountNI] = Fetch(hSGL, intStreamNI, intStartFetch, intRetrieveSamplesNI, [3 1],intDownsampleNI);<\/p>\n<p>One would then expect matDataNI to return channels in the order [3 1], but in fact Fetch() does not care about the query order and sorts the channels itself. It therefore instead returns the channels in the order [1 3]. I would call it a bug, but I suppose others might call it feature\u2026 Just be aware of how Fetch() behaves!<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"wiki_cats":[13,12],"wiki_tags":[15,14,16],"class_list":["post-88","yada_wiki","type-yada_wiki","status-publish","hentry","wiki_cats-experiments","wiki_cats-tips","wiki_tags-experiments","wiki_tags-spikeglx","wiki_tags-tips"],"_links":{"self":[{"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/yada_wiki\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/yada_wiki"}],"about":[{"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/types\/yada_wiki"}],"author":[{"embeddable":true,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":1,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/yada_wiki\/88\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=\/wp\/v2\/yada_wiki\/88\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"wiki_cats","embeddable":true,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=%2Fwp%2Fv2%2Fwiki_cats&post=88"},{"taxonomy":"wiki_tags","embeddable":true,"href":"https:\/\/www.ephyswiki.org\/index.php?rest_route=%2Fwp%2Fv2%2Fwiki_tags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}