def METHOD_NAME(self):
    rank = 0
    if self.comm is not None:
        rank = self.comm.rank
    # add simple sky gradient signal
    grad = OpSimGradient(nside=self.sim_nside, nest=True)
    grad.exec(self.data)
    # make a simple pointing matrix
    pointing = OpPointingHpix(nside=self.map_nside, nest=True)
    pointing.exec(self.data)
    # Write outputs to a test-specific directory
    mapdir = os.path.join(self.outdir, "grad")
    if rank == 0:
        if os.path.isdir(mapdir):
            shutil.rmtree(mapdir)
        os.makedirs(mapdir)
    handle = None
    if rank == 0:
        handle = open(os.path.join(mapdir, "out_test_madam_info"), "w")
    self.data.info(handle=handle)
    if rank == 0:
        handle.close()
    pars = {}
    pars["kfirst"] = "F"
    pars["base_first"] = 1.0
    pars["fsample"] = self.rate
    pars["nside_map"] = self.map_nside
    pars["nside_cross"] = self.map_nside
    pars["nside_submap"] = min(8, self.map_nside)
    pars["write_map"] = "F"
    pars["write_binmap"] = "T"
    pars["write_matrix"] = "F"
    pars["write_wcov"] = "F"
    pars["write_hits"] = "T"
    pars["kfilter"] = "F"
    pars["path_output"] = mapdir
    pars["info"] = 1
    madam = OpMadam(params=pars, name="grad")
    if madam.available:
        # Run Madam twice on the same data and ensure the result
        # does not change
        madam.exec(self.data)
        m0 = None
        if rank == 0:
            m0 = hp.read_map(os.path.join(mapdir, "madam_bmap.fits"))
        madam.exec(self.data)
        m1 = None
        failed = False
        if rank == 0:
            m1 = hp.read_map(os.path.join(mapdir, "madam_bmap_001.fits"))
            if not np.allclose(m0, m1):
                print("Madam did not produce the same map from the " "same data.")
                failed = True
        if self.comm is not None:
            failed = self.comm.bcast(failed, root=0)
        self.assertFalse(failed)
    else:
        print("libmadam not available, skipping tests")