Load a YAML file with parameter data and other metadata.

        :param path: Path to YAML file.
        :type path: str

        The data in the YAML file is used to set the properties for the instance.
        The YAML file must contain a ``parameters`` key.
        It may optionally include any keys defined in :attr:`.property_keys`.

        .. code-block:: yaml

          # data.yml
          ---
          name: Shield frequencies
          parameters:
            - name: a
              value: 24.50
            - name: β
              value: 42.10
              meta:
                phase_inverted: true


        .. code-block:: python

          parameters = Parameters('data.yml')
          parameters.name #=> 'Shield frequencies'
          parameters.get_value('a') #=> 24.50
          parameters.get_meta('β')['phase_inverted'] #=> true

def load_file(self, path):
        """Load a YAML file with parameter data and other metadata.

        :param path: Path to YAML file.
        :type path: str

        The data in the YAML file is used to set the properties for the instance.
        The YAML file must contain a ``parameters`` key.
        It may optionally include any keys defined in :attr:`.property_keys`.

        .. code-block:: yaml

          # data.yml
          ---
          name: Shield frequencies
          parameters:
            - name: a
              value: 24.50
            - name: β
              value: 42.10
              meta:
                phase_inverted: true


        .. code-block:: python

          parameters = Parameters('data.yml')
          parameters.name #=> 'Shield frequencies'
          parameters.get_value('a') #=> 24.50
          parameters.get_meta('β')['phase_inverted'] #=> true
        """
        data = yaml.load(open(path, 'r'))
        for key in self.property_keys:
            if key in data: setattr(self, key, data[key])
        self.parameters = self.parameter_list(data['parameters'])