<jupyter_start><jupyter_text>1.For critical value<jupyter_code>fix = {'duration': 360.0*1000, 'sigma_ou': 0.287031, 'K_gl': 2.573845, 
      # 'adap_init': 0.0 * np.random.uniform(0.99, 1, (1, 1)), #inkl a_adap Null setzen für ausschalten der Adap
       'tau_exc': 2.5, 'tau_inh': 3.75, 
       'c_excexc': 16, 'c_excinh': 12, 'c_inhexc': 12, 'c_inhinh': 3, 
       'a_exc': 1.0, 'a_inh': 1.0, 
       'mu_exc': 5.0, 'mu_inh': 5.0,
       'a_adap': 98.381822, 'tau_adap': 3050.402224,
       'exc_ext': 4.960871, 'inh_ext': 2.668888}
wc.params.update(fix)
dev = Derivations(model=wc, model_input=wc_input, params=fix)
wc.run()
thresh = 0.2 * np.max(wc.output, axis=1)
x=wc.exc[:,-600000:]
states_critical = [dev.getUpDownWindows(x[k], thresh[k], filter_long=True, dur=25) for k in range(len(x))]
fig = go.Figure()

time = len(states_critical[0]) / (1000/0.1) # number_of_integration_steps / (ms/integration_time_constant)
steps = len(states_critical[0])
fig.add_trace(go.Heatmap(z=states_critical, x=np.linspace(0,time,steps),
                         colorscale=[[0.0, colors['DOWN']], [0.5, colors['DOWN']], 
                                     [0.5, colors['UP']], [1.0, colors['UP']]],
                         colorbar=dict(nticks=2,
                                       tickvals=[0.05, 0.95], 
                                       ticktext=['DOWN', 'UP'],
                                       tickangle=90)))

fig.update_layout(template=template,
                  annotations=[
                      dict(x=0.49, y=1.15, text='b=98.38', font_color='gray')
                  ],
                 width=width*2, height=height)
fig.update_xaxes(tickvals=[], ticktext=[], ticks='')
fig.update_yaxes(title_text='Node', tickvals=[0,19,39,59,79], ticktext=['1','20','40','60','80'])
fig.show()
fig.write_img(IMG_PATH + 'b_critical.png')<jupyter_output><empty_output><jupyter_text>2. For half critical value<jupyter_code>fix = {'duration': 360.0*1000, 'sigma_ou': 0.287031, 'K_gl': 2.573845, 
      # 'adap_init': 0.0 * np.random.uniform(0.99, 1, (1, 1)), #inkl a_adap Null setzen für ausschalten der Adap
       'tau_exc': 2.5, 'tau_inh': 3.75, 
       'c_excexc': 16, 'c_excinh': 12, 'c_inhexc': 12, 'c_inhinh': 3, 
       'a_exc': 1.0, 'a_inh': 1.0, 
       'mu_exc': 5.0, 'mu_inh': 5.0,
       'a_adap': 60, 'tau_adap': 3050.402224,
       'exc_ext': 4.960871, 'inh_ext': 2.668888}
wc.params.update(fix)
dev = Derivations(model=wc, model_input=wc_input, params=fix)
wc.run()
thresh = 0.2 * np.max(wc.output, axis=1)
x=wc.exc[:,-600000:]
states_half = [dev.getUpDownWindows(x[k], thresh[k], filter_long=True, dur=25) for k in range(len(x))]
fig = go.Figure()

time = len(states_half[0]) / (1000/0.1) # number_of_integration_steps / (ms/integration_time_constant)
steps = len(states_half[0])
fig.add_trace(go.Heatmap(z=states_half, x=np.linspace(0,time,steps),
                         colorscale=[[0.0, colors['DOWN']], [0.5, colors['DOWN']], 
                                     [0.5, colors['UP']], [1.0, colors['UP']]],#[(0.00, colors['DOWN']),(1.0, colors['UP'])],
                         colorbar=dict(nticks=2,
                                       tickvals=[0.05, 0.95], 
                                       ticktext=['DOWN', 'UP'],
                                       tickangle=90)))

fig.update_layout(template=template,
                  annotations=[
                      dict(x=0.49, y=1.15, text='b=60', font_color='gray')
                  ],
                  width=800, height=400)
fig.update_xaxes(tickvals=[], ticktext=[], ticks='')
fig.update_yaxes(title_text='Node', tickvals=[0,19,39,59,79], ticktext=['1','20','40','60','80'])
fig.show()
fig.write_img(IMG_PATH + 'b_half.png')<jupyter_output><empty_output><jupyter_text>3. For b higher<jupyter_code>fix = {'duration': 360.0*1000, 'sigma_ou': 0.287031, 'K_gl': 2.573845, 
      # 'adap_init': 0.0 * np.random.uniform(0.99, 1, (1, 1)), #inkl a_adap Null setzen für ausschalten der Adap
       'tau_exc': 2.5, 'tau_inh': 3.75, 
       'c_excexc': 16, 'c_excinh': 12, 'c_inhexc': 12, 'c_inhinh': 3, 
       'a_exc': 1.0, 'a_inh': 1.0, 
       'mu_exc': 5.0, 'mu_inh': 5.0,
       'a_adap': 120, 'tau_adap': 3050.402224,
       'exc_ext': 4.960871, 'inh_ext': 2.668888}
wc.params.update(fix)
dev = Derivations(model=wc, model_input=wc_input, params=fix)
wc.run()
thresh = 0.2 * np.max(wc.output, axis=1)
x=wc.exc[:,-600000:]
states_higher = [dev.getUpDownWindows(x[k], thresh[k], filter_long=True, dur=25) for k in range(len(x))]
fig = go.Figure()

time = len(states_higher[0]) / (1000/0.1) # number_of_integration_steps / (ms/integration_time_constant)
steps = len(states_higher[0])
fig.add_trace(go.Heatmap(z=states_higher, x=np.linspace(0,time,steps),
                         colorscale=[[0.0, colors['DOWN']], [0.5, colors['DOWN']], 
                                     [0.5, colors['UP']], [1.0, colors['UP']]],
                         colorbar=dict(nticks=2,
                                       tickvals=[0.05, 0.95], 
                                       ticktext=['DOWN', 'UP'],
                                       tickangle=90)))

fig.update_layout(template=template,
                  annotations=[
                      dict(x=0.49, y=1.15, text='b=120', font_color='gray')
                  ],
                 width=width*2, height=height)
fig.update_xaxes(title_text='Time [s]', tickvals=[0,20,40,60])
fig.update_yaxes(title_text='Node', tickvals=[0,19,39,59,79], ticktext=['1','20','40','60','80'])
fig.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19023599351468204, 'fraction_numerical': 0.08106647450909746, 'mean_word_length': 2.6075373619233266, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '365696', 'license': 'MIT', 'n_tokens_mistral': 2428, 'n_tokens_neox': 2111, 'n_words': 340, 'path': 'States.ipynb', 'repo_name': 'ronja-roeberdotre/WC-model_withAdaptation', 'size': '5551'}