{"id":15967483,"url":"https://github.com/bryanlimy/spikes2calcium","last_synced_at":"2025-10-10T10:34:21.281Z","repository":{"id":113990930,"uuid":"494126233","full_name":"bryanlimy/spikes2calcium","owner":"bryanlimy","description":"A simple Python tool to convert spike trains to calcium fluorescence-like traces.","archived":false,"fork":false,"pushed_at":"2022-05-30T10:39:25.000Z","size":295,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T11:03:15.893Z","etag":null,"topics":["calcium-imaging","spike-trains"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryanlimy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-19T15:23:04.000Z","updated_at":"2022-05-29T14:38:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"23bb79f5-b964-4f85-999b-e152baab463d","html_url":"https://github.com/bryanlimy/spikes2calcium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bryanlimy/spikes2calcium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlimy%2Fspikes2calcium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlimy%2Fspikes2calcium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlimy%2Fspikes2calcium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlimy%2Fspikes2calcium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryanlimy","download_url":"https://codeload.github.com/bryanlimy/spikes2calcium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlimy%2Fspikes2calcium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003544,"owners_count":26083595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calcium-imaging","spike-trains"],"created_at":"2024-10-07T18:23:36.114Z","updated_at":"2025-10-10T10:34:21.245Z","avatar_url":"https://github.com/bryanlimy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## spikes2calcium\nA simple Python tool to convert spike trains to calcium fluorescence-like traces.\n\n---\n\n### Files\n- [`spikes2calcium.py`](spikes2calcium.py) - the main function to convert spike trains to calcium-like traces using the method described in [Grewe et. al. 2010](https://www.nature.com/articles/nmeth.1453) (codebase in MATLAB: [github.com/HelmchenLab/CalciumSim](https://github.com/HelmchenLab/CalciumSim)).\n- [`utils.py`](utils.py) - includes plotting code and spike train generation code for the demo.\n\n---\n\n### Usage\n```\nimport utils\nfrom spikes2calcium import spikes2calcium\n\n# generate spike trains from Poisson distribution\nDURATION = 20  # duration of the simulation in s\nNUM_NEURONS = 16  # number of neurons to simulate\nFRAME_RATE = 24.0  # frame rate of the simulation\nFIRING_RATE = 2.0  # firing rate in Hz\n\nspike_trains = utils.generate_spike_trains(firing_rate=FIRING_RATE,\n                                           duration=DURATION,\n                                           num_neuorns=NUM_NEURONS,\n                                           frame_rate=FRAME_RATE)\n\n# convolve spike trains to calcium-like traces\ntraces = spikes2calcium(spike_trains=spike_trains, frame_rate=FRAME_RATE)\n\n# plot the first 4 neurons\nutils.plot_traces(traces=traces,\n                  spike_trains=spike_trains,\n                  frame_rate=FRAME_RATE,\n                  filename='plots/traces.png',\n                  show=False,\n                  close=True)\n```\n\n### Example\n![trace examples](plots/traces.png)\n\n---\n\n### Installation\n- Package required: `numpy`, `matplotlib`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanlimy%2Fspikes2calcium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanlimy%2Fspikes2calcium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanlimy%2Fspikes2calcium/lists"}