def _load_coil_bank_list_from_config(self, config): coil_bank_list = [] # Make a list of unique coil banks if 'coils' in config: for name in config['coils']: item_dict = config['coils'][name] coil = PDBCoil(self, str(item_dict['number'])) if coil.bank() not in coil_bank_list: coil_bank_list.append(coil.bank()) return coil_bank_list
def get_proc_coil_number(self, number_str): """Get the actual number of a coil from the bank index config. Args: number_str (str): PDB string """ coil = PDBCoil(self, number_str) bank = coil.bank() if bank == -1: return -1 index = self.indexes.index(coil.bank()) num = index * 8 + coil.output() return num