code: def set_defaults(self):
          
          rfields, sfields = self.get_write_fields()
          for f in rfields:
              self.set_default(f)
          for f in sfields:
              self.set_default(f)
docs: Set defaults for fields needed to write the header if they have
          defaults.
  
          Notes
          -----
          - This is NOT called by `rdheader`. It is only automatically
            called by the gateway `wrsamp` for convenience.
          - This is also not called by `wrheader` since it is supposed to
            be an explicit function.
          - This is not responsible for initializing the attributes. That
            is done by the constructor.
  
          See also `set_p_features` and `set_d_features`.