  We present a method for extracting actions, angles and frequencies from an
orbit's time series. The method recovers the generating function that maps an
analytic phase-space torus to the torus to which the orbit is confined by
simultaneously solving the constraints provided by each time step. We test the
method by recovering the actions and frequencies of a triaxial St\"ackel
potential, and use it to investigate the structure of orbits in a triaxial
potential that has been fitted to our Galaxy's Sagittarius stream. The method
promises to be useful for analysing N-body simulations. It also takes a step
towards constructing distribution functions for the triaxial components of our
Galaxy, such as the bar and dark halo.
