neurocarto.probe_npx.stat
- neurocarto.probe_npx.stat.npx_electrode_density(chmap)
- Parameters:
chmap (ChannelMap)
- Returns:
density curve array. Array[float, S, (v, y), Y].
- Return type:
ndarray[tuple[int, …], dtype[float64]]
- neurocarto.probe_npx.stat.npx_request_electrode(bp, blueprint=None)
- Parameters:
bp (BlueprintFunctions)
blueprint (ndarray[tuple[int, ...], dtype[int64]] | None) – a given blueprint.
- Returns:
channel efficiency value
- Return type:
float
- neurocarto.probe_npx.stat.npx_channel_efficiency(bp, channelmap=None, blueprint=None)
Calculate the area and channel efficiency for a channel map with a given blueprint.
- Parameters:
bp (BlueprintFunctions)
channelmap (ChannelMap | None) – channelmap outcomes from blueprint
blueprint (ndarray[tuple[int, ...], dtype[int64]] | None) – a given blueprint.
- Returns:
tuple of area and channel efficiency value
- Return type:
tuple[float, float]
- class neurocarto.probe_npx.stat.ElectrodeProbability
ElectrodeProbability(sample_times, summation, complete, channel_efficiency_)
- sample_times: int
number of sample times
- summation: ndarray[tuple[int, ...], dtype[int64]]
summation matrix Array[count:int, S, C, R]
- complete: int
number of sample that get a complete result
- channel_efficiency_: ndarray[tuple[int, ...], dtype[float64]]
collected channel_efficiency array.
- property probability: ndarray[tuple[int, ...], dtype[float64]]
probability matrix Array[prob:float, S, C, R]
- property complete_rate: float
- property channel_efficiency: float
max channel efficiency
- property channel_efficiency_mean: float
mean channel efficiency
- property channel_efficiency_var: float
channel efficiency variance
- static __new__(_cls, sample_times, summation, complete, channel_efficiency_)
Create new instance of ElectrodeProbability(sample_times, summation, complete, channel_efficiency_)
- Parameters:
sample_times (int)
summation (NDArray[np.int_])
complete (int)
channel_efficiency_ (NDArray[np.float64])
- classmethod concat(result)
- Parameters:
result (list[ElectrodeProbability])
- Return type:
Self
- neurocarto.probe_npx.stat.npx_electrode_probability(probe, chmap, blueprint, selector='default', sample_times=1000, n_worker=1)
Sample sample_times channelmap outcomes for a given blueprint.
- Parameters:
probe (NpxProbeDesp)
chmap (ChannelMap) – channelmap instance, use as a reference.
blueprint (list[NpxElectrodeDesp]) – a given blueprint.
selector (str | ElectrodeSelector) – use which electrode selecting method.
sample_times (int)
n_worker (int) – number of process.
- Returns:
ElectrodeProbability
- Return type: