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
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 127 128 129 130 131 132 | |
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
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 | |
get_global_metric()
¶
Return the global coherence metric (Phi-like).
Source code in src/sc_neurocore/scpn/layers/l1_quantum.py
130 131 132 | |
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
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 | |
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, ndarray[Any, Any]]
|
Dict with receptor_activity, second_messengers, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
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 | |
release_neurotransmitter(nt_type, amount)
¶
Trigger neurotransmitter release.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
165 166 167 168 169 170 | |
get_global_metric()
¶
Return the global neurochemical activity metric.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
172 173 174 | |
get_neuromodulation_state()
¶
Return named neurotransmitter levels for external use.
Source code in src/sc_neurocore/scpn/layers/l2_neurochemical.py
176 177 178 179 180 181 182 183 | |
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
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 | |
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, ndarray[Any, Any]]
|
Dict with expression, protein_levels, chromatin_state, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
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 | |
get_global_metric()
¶
Return the global genomic activity metric.
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
207 208 209 | |
get_ciss_coherence()
¶
Return CISS spin coherence metric.
Source code in src/sc_neurocore/scpn/layers/l3_genomic.py
211 212 213 | |
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
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 | |
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, ndarray[Any, Any]]
|
Dict with phases, calcium, synchronization, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
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 | |
get_global_metric()
¶
Return the global synchronization metric (Kuramoto order parameter).
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
203 204 205 | |
get_tissue_pattern()
¶
Return 2D tissue activity pattern.
Source code in src/sc_neurocore/scpn/layers/l4_cellular.py
207 208 209 | |
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
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 | |
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
|
Optional[Dict[str, Any]]
|
Cellular layer output (synchronization). |
None
|
external_event
|
Optional[Dict[str, Any]]
|
External emotional trigger {valence, arousal, ...}. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, ndarray[Any, Any]]
|
Dict with emotional_state, autonomic, heart_rate, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
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 | |
get_global_metric()
¶
Return the global organismal coherence metric.
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
245 246 247 248 249 250 | |
get_emotional_valence()
¶
Return current emotional valence.
Source code in src/sc_neurocore/scpn/layers/l5_organismal.py
252 253 254 | |
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
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 | |
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, ndarray[Any, Any]]
|
Dict with schumann_field, geomag, circadian, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
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 | |
get_global_metric()
¶
Return the global planetary coherence metric.
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
228 229 230 | |
get_schumann_spectrum()
¶
Return current Schumann resonance spectrum.
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
232 233 234 235 236 237 238 239 | |
get_circadian_time()
¶
Return current circadian time (0-24 hours).
Source code in src/sc_neurocore/scpn/layers/l6_ecological.py
241 242 243 | |
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
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 | |
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, ndarray[Any, Any]]
|
Dict with glyph_vector, meridian_qi, sacred_geometry, output_bitstreams |
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
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 | |
get_global_metric()
¶
Return the global symbolic coherence metric.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
273 274 275 | |
get_glyph_vector_normalized()
¶
Return normalized glyph vector for external use.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
277 278 279 | |
stimulate_meridian(meridian_id, intensity)
¶
Stimulate a specific meridian.
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
281 282 283 284 285 286 | |
get_acupoint_map()
¶
Return named acupoint activations (simplified set).
Source code in src/sc_neurocore/scpn/layers/l7_symbolic.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
create_full_stack(params=None)
¶
Create a complete 16-layer SCPN stack.
Source code in src/sc_neurocore/scpn/layers/__init__.py
98 99 100 101 | |
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
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 | |
get_global_metrics(layers)
¶
Get global coherence metrics from all layers.
Source code in src/sc_neurocore/scpn/layers/__init__.py
196 197 198 | |
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
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 | |