When I heard the learn'd astronomer,
When the proofs, the figures, were ranged in columns before me,
When I was shown the charts and diagrams, to add, divide, and measure them,
When I sitting heard the astronomer where he lectured with much
applause in the lecture-room,
How soon unaccountable I became tired and sick,
Till rising and gliding out I wander'd off by myself,
In the mystical moist night-air, and from time to time,
Look'd up in perfect silence at the stars.
Whitman immerses himself in the world outside of the lecture room and finds himself entranced by the beauty he feels. His experiences become much more sensory (“moist night-air”) in contrast to the exact and superficial emotions in the first half of the poem. Here, we see Whitman’s famously romantic style (see  Song of Myself ) return. 

When I Heard the Learnd Astronomer