Background: Roger Keith "Syd" Barrett (6 January 1946 - 7 July 2006) was an English singer, songwriter, musician, composer, and painter. Best known as a founder member of the band Pink Floyd, Barrett was the lead singer, guitarist and principal songwriter in its early years and is credited with naming the band. Barrett was excluded from Pink Floyd in April 1968 after David Gilmour took over as their new guitarist, and was briefly hospitalised amid speculation of mental illness. Barrett was musically active for less than ten years.
Context: The second album, Barrett, was recorded more sporadically than the first, with sessions taking place between February and July 1970. The album was produced by David Gilmour, and featured Gilmour on bass guitar, Richard Wright on keyboard and Humble Pie drummer Jerry Shirley. The first two songs attempted were for Barrett to play and/or sing to an existing backing track. However, Gilmour thought they were losing the "Barrett-ness". One track ("Rats") was originally recorded with Barrett on his own. That would later be overdubbed by musicians, despite the changing tempos. Shirley said of Barrett's playing: "He would never play the same tune twice. Sometimes Syd couldn't play anything that made sense; other times what he'd play was absolute magic." At times Barrett, who experienced synaesthesia, would say: "Perhaps we could make the middle darker and maybe the end a bit middle afternoonish. At the moment it's too windy and icy".  These sessions were happening while Pink Floyd had just begun to work on Atom Heart Mother. On various occasions, Barrett went to "spy" on the band as they recorded their album.  Wright said of the Barrett sessions:  Doing Syd's record was interesting, but extremely difficult. Dave [Gilmour] and Roger did the first one (The Madcap Laughs) and Dave and myself did the second one. But by then it was just trying to help Syd any way we could, rather than worrying about getting the best guitar sound. You could forget about that! It was just going into the studio and trying to get him to sing.
Question: what did they do while working on atom heart mother?

Answer:
On various occasions, Barrett went to "spy" on the band as they recorded their album.