Connectivity Redo update

In April 2025, I changed how the connectivity and hyperscanning information was stored with regard to the probe field. Specificially, the previous model had stored connectivity as a matrix of size height(probe.link) ^2. This meant that the matrix always had to be square and always had to match the probe.link field. The limitations of this were that you could not ever remove parts of the connectivity (such as the HbO2-HbR connections) without hacking the code.

In the new version, there is a field in the probe called “connections” and a new probe class for connectivity has been created. This probe.connections table contains the following columns:

probe.connections.start -> the index of the probe.link_probe entry for the origin of the connections probe.connections.end-> the index of the probe.link_probe entry for the destination of the connections
probe.connections.type -> used to denote conditions or types (e.g. phase vs magnitude)

probe.link_probe is a hidden field that maintains the original probe link. This was changed in the core probe type (non connectivity) although it should be completely abstracted away and the end-user should never have to change any of their existing code.

probe.link is now a dependent field and is computed on demand from probe.link_probe and probe.connectivity. You can set probe.link, but behind the scenes it is actually redirecting these calls to probe.link_probe as the hidden and master variable from which probe.link is derived.

Additional changes.

nirs.modules.Discard/Keep types now accepts types of “same” or “diff” which can be used to remove/keep cross types (e.g. hbo-hb) in the connectivity probe.

nirs.modules.RemoveHyperScanIntraSubject –> removes within subject (intra0subject) terms from hyperscanning data

Note, in the new model, when you remove parts of the connectivty data, it is modified in the correlation (R) field, the StdErr field (if appliciable) and the probe.connections table. Probe.link will automatically update if probe.connections is changed.