code: def load_nddata(self, ndd, naxispath=None):
          
          self.clear_metadata()
  
          # Make a header based on any NDData metadata
          ahdr = self.get_header()
          ahdr.update(ndd.meta)
  
          self.setup_data(ndd.data, naxispath=naxispath)
  
          if ndd.wcs is None:
              # no wcs in ndd obj--let's try to make one from the header
              self.wcs = wcsmod.WCS(logger=self.logger)
              self.wcs.load_header(ahdr)
          else:
              # already have a valid wcs in the ndd object
              # we assume it needs an astropy compatible wcs
              wcsinfo = wcsmod.get_wcs_class('astropy')
              self.wcs = wcsinfo.wrapper_class(logger=self.logger)
              self.wcs.load_nddata(ndd)
docs: Load from an astropy.nddata.NDData object.