docs: def export(self, nidm_version, export_dir):
          """
          Create prov entities and activities.
          """
          # Create cvs file containing design matrix
          np.savetxt(os.path.join(export_dir, self.csv_file),
                     np.asarray(self.matrix), delimiter=",")
  
          if nidm_version['num'] in ["1.0.0", "1.1.0"]:
              csv_location = Identifier("file://./" + self.csv_file)
          else:
              csv_location = Identifier(self.csv_file)
  
          attributes = [(PROV['type'], self.type),
                        (PROV['label'], self.label),
                        (NIDM_REGRESSOR_NAMES, json.dumps(self.regressors)),
                        (DCT['format'], "text/csv"),
                        (NFO['fileName'], self.filename),
                        (DC['description'], self.image.id),
                        (PROV['location'], csv_location)]
  
          if self.hrf_models is not None:
              if nidm_version['num'] in ("1.0.0", "1.1.0"):
                  if self.design_type is not None:
                      attributes.append(
                          (NIDM_HAS_FMRI_DESIGN, self.design_type))
                  else:
                      warnings.warn("Design type is missing")
  
              # hrf model
              for hrf_model in self.hrf_models:
                  attributes.append((NIDM_HAS_HRF_BASIS, hrf_model))
              # drift model
              if self.drift_model is not None:
                  attributes.append((NIDM_HAS_DRIFT_MODEL, self.drift_model.id))
  
          # Create "design matrix" entity
          self.add_attributes(attributes)