SCPN Layers¶
Stochastic Coupled Phase-oscillator Network layer adapters.
Maps the 16-layer SCPN holonomic model (L1 Quantum through L16 Meta) into SC-NeuroCore's simulation engine. JAX-accelerated Kuramoto coupling, UPDE solvers, and phase coherence metrics.
from sc_neurocore.scpn import KuramotoCoupling, PhaseCoherenceMetric
sc_neurocore.scpn
¶
sc_neurocore.scpn -- Tier: research (experimental / research).
L1_QuantumLayer
¶
Stochastic implementation of the Quantum Cellular Field.
Source code in src/sc_neurocore/scpn/layers/l1_quantum.py
| Python | |
|---|---|
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
step(dt, external_field=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
external_field
|
Optional[ndarray[Any, Any]]
|
Optional coupling input from other layers (normalized 0-1). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
output_bitstreams |
ndarray[Any, Any]
|
The stochastic state of the field. |
Source code in src/sc_neurocore/scpn/layers/l1_quantum.py
| Python | |
|---|---|
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
get_global_metric()
¶
Return the global coherence metric (Phi-like).
Source code in src/sc_neurocore/scpn/layers/l1_quantum.py
| Python | |
|---|---|
136 137 138 | |
L2_NeurochemicalLayer
¶
Stochastic implementation of the Neurochemical Signaling Layer.
Models receptor-ligand binding, neurotransmitter dynamics, and second messenger cascades using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
| Python | |
|---|---|
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | |
step(dt, nt_release=None, l1_input=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
nt_release
|
Optional[ndarray[Any, Any]]
|
Neurotransmitter release rates [4] (0-1 normalized). |
None
|
l1_input
|
Optional[ndarray[Any, Any]]
|
Quantum layer input (coherence modulation). |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with receptor_activity, second_messengers, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
| Python | |
|---|---|
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
release_neurotransmitter(nt_type, amount)
¶
Trigger neurotransmitter release.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
| Python | |
|---|---|
181 182 183 184 185 186 187 188 189 190 191 | |
get_global_metric()
¶
Return the global neurochemical activity metric.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
| Python | |
|---|---|
193 194 195 | |
get_neuromodulation_state()
¶
Return named neurotransmitter levels for external use.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
| Python | |
|---|---|
197 198 199 200 201 202 203 204 | |
L3_GenomicLayer
¶
Stochastic implementation of the Genomic-Epigenomic Layer.
Models gene expression, epigenetic modifications, and bioelectric pattern formation using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
| Python | |
|---|---|
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
step(dt, l2_input=None, bioelectric_signal=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
l2_input
|
Optional[Dict[str, Any]]
|
Neurochemical layer output (second messengers). |
None
|
bioelectric_signal
|
Optional[ndarray[Any, Any]]
|
External bioelectric modulation. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with expression, protein_levels, chromatin_state, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
| Python | |
|---|---|
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
get_global_metric()
¶
Return the global genomic activity metric.
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
| Python | |
|---|---|
217 218 219 | |
get_ciss_coherence()
¶
Return CISS spin coherence metric.
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
| Python | |
|---|---|
221 222 223 | |
L4_CellularLayer
¶
Stochastic implementation of the Cellular-Tissue Synchronization Layer.
Models collective cellular behavior, gap junction coupling, and tissue-level pattern formation using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
| Python | |
|---|---|
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
step(dt, l3_input=None, external_stimulus=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
l3_input
|
Optional[Dict[str, Any]]
|
Genomic layer output (protein levels). |
None
|
external_stimulus
|
Optional[ndarray[Any, Any]]
|
External stimulation pattern. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with phases, calcium, synchronization, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
| Python | |
|---|---|
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
get_global_metric()
¶
Return the global synchronization metric (Kuramoto order parameter).
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
| Python | |
|---|---|
216 217 218 | |
get_tissue_pattern()
¶
Return 2D tissue activity pattern.
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
| Python | |
|---|---|
220 221 222 | |
L5_OrganismalLayer
¶
Stochastic implementation of the Organismal-Psychoemotional Layer.
Models whole-organism integration, autonomic regulation, and emotional dynamics using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
| Python | |
|---|---|
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
step(dt, l4_input=None, external_event=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
l4_input
|
dict[str, Any] | None
|
Cellular layer output (synchronization). |
None
|
external_event
|
dict[str, Any] | None
|
External emotional trigger {valence, arousal, ...}. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict with emotional_state, autonomic, heart_rate, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
| Python | |
|---|---|
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
get_global_metric()
¶
Return the global organismal coherence metric.
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
| Python | |
|---|---|
254 255 256 257 258 259 | |
get_emotional_valence()
¶
Return current emotional valence.
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
| Python | |
|---|---|
261 262 263 | |
L6_EcologicalLayer
¶
Stochastic implementation of the Ecological-Planetary Layer.
Models planetary-scale electromagnetic fields, Schumann resonances, and biospheric network dynamics using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
| Python | |
|---|---|
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |
step(dt, l5_input=None, solar_activity=0.5, lunar_phase=0.0)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
l5_input
|
Optional[Dict[str, Any]]
|
Organismal layer output (emotional coherence). |
None
|
solar_activity
|
float
|
Solar activity index (0-1). |
0.5
|
lunar_phase
|
float
|
Lunar phase (0 to 2π). |
0.0
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with schumann_field, geomag, circadian, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
| Python | |
|---|---|
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
get_global_metric()
¶
Return the global planetary coherence metric.
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
| Python | |
|---|---|
235 236 237 | |
get_schumann_spectrum()
¶
Return current Schumann resonance spectrum.
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
| Python | |
|---|---|
239 240 241 242 243 244 245 246 | |
get_circadian_time()
¶
Return current circadian time (0-24 hours).
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
| Python | |
|---|---|
248 249 250 | |
L7_SymbolicLayer
¶
Stochastic implementation of the Geometric-Symbolic Layer.
Models sacred geometry patterns, symbolic resonances, and acupuncture point dynamics using bitstream representations.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
step(dt, l6_input=None, symbol_input=None, acupoint_stimulus=None)
¶
Advance the layer by one time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
Time step in seconds. |
required |
l6_input
|
Optional[Dict[str, Any]]
|
Ecological layer output (Schumann, circadian). |
None
|
symbol_input
|
Optional[ndarray[Any, Any]]
|
External symbolic input vector. |
None
|
acupoint_stimulus
|
Optional[Dict[int, float]]
|
Dict of {point_id: intensity} for acupuncture. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with glyph_vector, meridian_qi, sacred_geometry, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
get_global_metric()
¶
Return the global symbolic coherence metric.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
281 282 283 | |
get_glyph_vector_normalized()
¶
Return normalized glyph vector for external use.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
285 286 287 | |
stimulate_meridian(meridian_id, intensity)
¶
Stimulate a specific meridian.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
289 290 291 292 293 294 295 | |
get_acupoint_map()
¶
Return clinically common named acupoint activations.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
| Python | |
|---|---|
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
SCPNDatastream
dataclass
¶
In-memory representation of one deterministic SCPN stream.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
n_steps
property
¶
Number of timesteps in the stream.
n_layers
property
¶
Number of SCPN layer channels in the stream.
firing_rates
property
¶
Mean spike probability per layer over this stream window.
rotation_angles_rad
property
¶
Ry angles for quantum-control bridges: firing rate times pi.
quantum_amplitudes
property
¶
Real amplitude encoding of firing rates as [alpha, beta] pairs.
to_json_dict()
¶
Serialise the datastream to a stable JSON-compatible mapping.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
from_json_dict(payload)
classmethod
¶
Load and validate a datastream from a JSON-compatible mapping.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
create_full_stack(params=None)
¶
Create a complete 16-layer SCPN stack.
Source code in src/sc_neurocore/scpn/layers/__init__.py
| Python | |
|---|---|
99 100 101 102 | |
run_integrated_step(layers, dt, inputs=None)
¶
Run one integrated time step across all SCPN layers with inter-layer coupling.
Source code in src/sc_neurocore/scpn/layers/__init__.py
| Python | |
|---|---|
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
get_global_metrics(layers)
¶
Get global coherence metrics from all layers.
Source code in src/sc_neurocore/scpn/layers/__init__.py
| Python | |
|---|---|
197 198 199 | |
build_knm_matrix(n_layers=N_LAYERS)
¶
Build the Knm inter-layer coupling matrix.
Construction: exponential decay baseline, calibration anchor overrides, cross-hierarchy boosts, symmetrisation, zero diagonal.
Source code in src/sc_neurocore/scpn/params.py
| Python | |
|---|---|
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
generate_scpn_datastream(*, n_steps=32, dt_s=0.01, seed=1729, spike_floor=0.02, spike_ceiling=0.98)
¶
Generate a deterministic 16-layer stream for inter-repository tests.
The probability envelope is a bounded phase oscillator driven by the
canonical SCPN natural frequencies and a small normalised coupling
bias derived from K_nm. The binary spike train is sampled from
that envelope with a local RNG seeded by seed.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
generate_scpn_datastream_payload(**kwargs)
¶
Generate a JSON-compatible stream payload in one call.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
262 263 264 | |
read_scpn_datastream(path)
¶
Read a stream payload from JSON.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
217 218 219 220 221 222 | |
validate_scpn_datastream(stream)
¶
Validate shape, bounds, and canonical matrix invariants.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
write_scpn_datastream(path, stream)
¶
Write a stream payload to JSON.
Source code in src/sc_neurocore/scpn/datastream.py
| Python | |
|---|---|
211 212 213 214 | |