parameters: (self, name='Setting', parameter='settings')
return_statement: return {name:
                  f'{name}: "{setting}" is unknown for instrument '
                  + f'{instrument_name}. Supported values: '
                  + ', '.join(sorted(parameters[parameter].keys()))}
docstring: Check that multiple-choice parameter is compatible with selected Instrument
docstring_summary: Check that multiple-choice parameter is compatible with selected Instrument
docstring_tokens: Check that multiple - choice parameter is compatible with selected Instrument
function: def _validate_instrument_settings(self, name='Setting', parameter='settings') -> Dict[str, str]:
          """Check that multiple-choice parameter is compatible with selected Instrument"""
          instrument_name = self.getProperty("Instrument").value
          setting = self.getProperty(name).value
  
          if instrument_name not in abins.parameters.instruments:
              # If an instrument lacks an entry in abins.parameters, we cannot
              # reason about how appropriate the setting is; assume good.
              return {}
  
          parameters = abins.parameters.instruments.get(instrument_name)
  
          if setting == '':
              if parameter + '_default' in parameters:
                  return {}
              else:
                  return {"Setting":
                          f'Instrument "{instrument_name}" does not have a default '
                          + 'setting, and no setting was specified. Accepted settings: '
                          + ', '.join(parameters[parameter].keys())}
  
          downcased_settings = {s.lower(): s for s in parameters[parameter]}
          if setting.lower() in downcased_settings:
              return {}
  
          return {name:
                  f'{name}: "{setting}" is unknown for instrument '
                  + f'{instrument_name}. Supported values: '
                  + ', '.join(sorted(parameters[parameter].keys()))}
function_tokens: def _validate_instrument_settings ( self , name = 'Setting' , parameter = 'settings' ) -> Dict [ str , str ] : instrument_name = self . getProperty ( "Instrument" ) . value setting = self . getProperty ( name ) . value if instrument_name not in abins . parameters . instruments : # If an instrument lacks an entry in abins.parameters, we cannot # reason about how appropriate the setting is; assume good. return { } parameters = abins . parameters . instruments . get ( instrument_name ) if setting == '' : if parameter + '_default' in parameters : return { } else : return { "Setting" : f'Instrument "{instrument_name}" does not have a default ' + 'setting, and no setting was specified. Accepted settings: ' + ', ' . join ( parameters [ parameter ] . keys ( ) ) } downcased_settings = { s . lower ( ) : s for s in parameters [ parameter ] } if setting . lower ( ) in downcased_settings : return { } return { name : f'{name}: "{setting}" is unknown for instrument ' + f'{instrument_name}. Supported values: ' + ', ' . join ( sorted ( parameters [ parameter ] . keys ( ) ) ) }