axon_population.add_mask

axon_population.add_mask(data: ndarray | str, label: None | str = None, overwrite: bool = True, mask_on: list[str] = []) tuple[int, ndarray]

Add a mask on the population

Parameters:
  • data (np.ndarray | str) –

    Data to use for the mask, can be either:
    • str: compatible to DataFrame.eval() from wich the mask will be generated.

    • 1D array-like: Mask that will be converted to booleen and added.

  • label (None | str, optional) – Mask label, if None the label is set to “mask_n” where n in the smaller leading to an unused label, by default None.

  • overwrite (bool, optional) – if True and label exists the method will do nothing, by default True