{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/306","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/306/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/306/events","html_url":"https://github.com/brian-team/brian2/issues/306","id":39816718,"number":306,"title":"Exporting/importing Brian data from/to other formats","user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brian-team/brian2/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/brian-team/brian2/milestones/8","labels_url":"https://api.github.com/repos/brian-team/brian2/milestones/8/labels","id":961070,"number":8,"title":"2.0beta3","description":"","creator":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":0,"state":"open","created_at":"2015-02-02T09:39:43Z","updated_at":"2015-02-12T14:31:21Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2014-08-08T12:16:46Z","updated_at":"2015-02-12T16:20:07Z","closed_at":null,"body":"[Following up to my comment on #298.] I think it would be nice if we had a general mechanism to export data from Brian to other formats, so that it is very easy for users to connect Brian with existing analysis tools or store results. I'm not thinking of anything complicated here, data would still be internally stored as numpy arrays (respectively dynamic arrays). For example, each `Group` (i.e. every object that has state variables, including monitors) could have an `export` method:\r\n```Python\r\nsyn = Synapses(...)\r\ns_mon = StateMonitor(...)\r\nspike_mon = SpikeMonitor(...)\r\n...\r\ns_mon_data = s_mon.export()  # export all state variables to a format set by a preference\r\nsynaptic_weights = syn.export(['w'])  # export a subset of state variables\r\nspikes_neo = spikes.export(format='neo')  # export to a specific format\r\n```\r\nI think the approach above with a general method and a `format` keyword would be a nice approach, we could implement this as  a plugin mechanism, allowing a user (or an external library) to register itself for use in Brian without having to change Brian code itself."},"comment":{"url":"https://api.github.com/repos/brian-team/brian2/issues/comments/74099959","html_url":"https://github.com/brian-team/brian2/issues/306#issuecomment-74099959","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/306","id":74099959,"user":{"login":"thesamovar","id":2903870,"avatar_url":"https://avatars.githubusercontent.com/u/2903870?v=3","gravatar_id":"","url":"https://api.github.com/users/thesamovar","html_url":"https://github.com/thesamovar","followers_url":"https://api.github.com/users/thesamovar/followers","following_url":"https://api.github.com/users/thesamovar/following{/other_user}","gists_url":"https://api.github.com/users/thesamovar/gists{/gist_id}","starred_url":"https://api.github.com/users/thesamovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesamovar/subscriptions","organizations_url":"https://api.github.com/users/thesamovar/orgs","repos_url":"https://api.github.com/users/thesamovar/repos","events_url":"https://api.github.com/users/thesamovar/events{/privacy}","received_events_url":"https://api.github.com/users/thesamovar/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T16:20:07Z","updated_at":"2015-02-12T16:20:07Z","body":"This all sounds great to me."}}