(self)
| 1535 | self.reset() |
| 1536 | |
| 1537 | def _setup_digs(self): |
| 1538 | if self._info is None: |
| 1539 | self._dig_dict = dict( |
| 1540 | hpi=np.zeros((1, 3)), |
| 1541 | dig_ch_pos_location=np.zeros((1, 3)), |
| 1542 | hsp=np.zeros((1, 3)), |
| 1543 | rpa=np.zeros((1, 3)), |
| 1544 | nasion=np.zeros((1, 3)), |
| 1545 | lpa=np.zeros((1, 3)), |
| 1546 | ) |
| 1547 | else: |
| 1548 | self._dig_dict = _get_data_as_dict_from_dig( |
| 1549 | dig=self._info["dig"], exclude_ref_channel=False |
| 1550 | ) |
| 1551 | # adjustments: |
| 1552 | # set weights to 0 for None input |
| 1553 | # convert fids to float arrays |
| 1554 | for k, w_atr in zip( |
| 1555 | ["nasion", "lpa", "rpa", "hsp", "hpi"], |
| 1556 | [ |
| 1557 | "_nasion_weight", |
| 1558 | "_lpa_weight", |
| 1559 | "_rpa_weight", |
| 1560 | "_hsp_weight", |
| 1561 | "_hpi_weight", |
| 1562 | ], |
| 1563 | ): |
| 1564 | if self._dig_dict[k] is None: |
| 1565 | self._dig_dict[k] = np.zeros((0, 3)) |
| 1566 | setattr(self, w_atr, 0) |
| 1567 | elif k in ["rpa", "nasion", "lpa"]: |
| 1568 | self._dig_dict[k] = np.array([self._dig_dict[k]], float) |
| 1569 | |
| 1570 | def _setup_bem(self): |
| 1571 | # find high-res head model (if possible) |
no test coverage detected