Create cross sections in Python