Develop README
==============

Adding a potential to the C integrator
--------------------------------------

1) Implement the potential in a .c file under
potential/potential_c_ext. Look at
potential/potential_c_ext/LogarithmicHaloPotential.c for the right
format

2) Add your new potential to
potential/potential_c_ext/galpy_potentials.h

3) Edit the code under orbit/orbit_c_ext/integratePlanarOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs' function)

4) Edit the code in orbit/integratePlanarOrbit.py to set up your
new potential

5) Edit the code under orbit/orbit_c_ext/integrateFullOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs_Full' function)

6) Edit the code in orbit/integrateFullOrbit.py to set up your
new potential

7) Finally, add 'self.hasC= True' to the initialization of the
potential in question (after the initialization of the super class)

8) It should work now!

9) If you implement the second derivatives of the potential necessary
to integrate phase-space volumes, also set self.hasC_dxdv=True to the
initialization of the potential in question.

10) If you add a potential that gets passed to C as a list, you need
to edit orbit/integrateLinearOrbit.py and
orbit/orbit_c_ext/integrateLinearPotential.c to parse it properly (for
regular 3D potentials this works out of the box).

11) If you add a 1D potential, do the steps above, but for
integrateLinearOrbit.*
