Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/PeyracheLab/pynacollada
20 September 2023, 09:49:18 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/dev
    • refs/heads/main
    No releases to show
  • 5cac87a
  • /
  • pynacollada
  • /
  • neural_tuning
  • /
  • Tutorial_PoissonGLM.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:7216c108513d012681c2159d4e50b797bf80ab6d
origin badgedirectory badge
swh:1:dir:bd9d3a4b73b0f4285b3baf8a908c0ac87f420c72
origin badgerevision badge
swh:1:rev:4dd1adddad54627601f7567354fa7f0af020fc7d
origin badgesnapshot badge
swh:1:snp:472c8b4122787563406089e51e202205f9d95a1a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 4dd1adddad54627601f7567354fa7f0af020fc7d authored by Guillaume Viejo on 05 July 2023, 20:05:21 UTC
Merge pull request #22 from slcalgin/main
Tip revision: 4dd1add
Tutorial_PoissonGLM.py
# -*- coding: utf-8 -*-
# @Author: gviejo
# @Date:   2022-08-24 15:16:57
# @Last Modified by:   gviejo
# @Last Modified time: 2022-08-24 17:03:58


import numpy as np
from matplotlib.pyplot import *
from scipy.io import loadmat
import pynapple as nap
from numba import jit

# LOAD THE DATA
stim = np.squeeze(loadmat('data_RGCs/Stim.mat')['Stim']) # contains stimulus value at each frame
stim_times = np.squeeze(loadmat('data_RGCs/stimtimes.mat')['stimtimes']) # contains time in seconds at each frame (120 Hz)
all_spike_times = [np.squeeze(x) for x in np.squeeze(loadmat('data_RGCs/SpTimes.mat')['SpTimes'])] # time of spikes for 4 neurons (in units of stim frames)


# Putting the data into pynapple
dt = stim_times[1] - stim_times[0]

main_ep = nap.IntervalSet(start=0, end=(stim.size)*dt)
stimulus = nap.Tsd(t = stim_times, d = stim, time_support = main_ep)
spikes = nap.TsGroup(
    {i:nap.Ts(t = all_spike_times[i]) for i in range(len(all_spike_times))},
    time_support = main_ep,
    num_spikes = np.array([len(spk) for spk in all_spike_times])
    )


regressors, offset, p = nap.compute_1d_poisson_glm(spikes, stimulus, dt, 0.2, ep = main_ep)


count = spikes.count(dt)


figure()
plot(count[2])
plot(p[2])

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API