<commit_before>"""
Create odorant stimuli in hd5 format
"""

"""
Create the gexf configuration based on E. Hallem's cell paper on 2006

"""

import numpy as np
import h5py

osn_num = 1375;
f = h5py.File("al.hdf5","w")

dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during odor delivery period
Nt = 4*Ot + 3*Rt # number of data point
t  = np.arange(0,dt*Nt,dt)

I       = 0.0195 # amplitude of the onset odorant concentration
u_on    = I*np.ones( Ot, dtype=np.float64)
u_off   = np.zeros( Ot, dtype=np.float64)
u_reset = np.zeros( Rt, dtype=np.float64)
u       = np.concatenate((u_off,u_reset,u_on,u_reset,u_off,u_reset,u_on))
u_all   = np.transpose( np.kron( np.ones((osn_num,1)), u))

# create the dataset
dset = f.create_dataset("acetone_on_off.hdf5",(Nt, osn_num), dtype=np.float64,\
        data = u_all)

f.close()<commit_msg>Changed the sign of odorant stimuli to negative.<commit_after>"""
Create odorant stimuli in hd5 format
"""

"""
Create the gexf configuration based on E. Hallem's cell paper on 2006

"""

import numpy as np
import h5py

osn_num = 1375;
f = h5py.File("al.hdf5","w")

dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during odor delivery period
Nt = 4*Ot + 3*Rt # number of data point
t  = np.arange(0,dt*Nt,dt)

I       = -1.*0.0195 # amplitude of the onset odorant concentration
u_on    = I*np.ones( Ot, dtype=np.float64)
u_off   = np.zeros( Ot, dtype=np.float64)
u_reset = np.zeros( Rt, dtype=np.float64)
u       = np.concatenate((u_off,u_reset,u_on,u_reset,u_off,u_reset,u_on))
u_all   = np.transpose( np.kron( np.ones((osn_num,1)), u))

# create the dataset
dset = f.create_dataset("acetone_on_off.hdf5",(Nt, osn_num), dtype=np.float64,\
        data = u_all)

f.close()
{'fraction_non_alphanumeric': 0.1336986301369863, 'fraction_numerical': 0.04438356164383562, 'mean_word_length': 3.948509485094851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6640798', 'n_tokens_mistral': 795, 'n_tokens_neox': 727, 'n_words': 202}