updated the physics bit (still wrong though)

changed momentum and energy transform calculations
fixed an infinite loop bug

also uncommented the stats methods
added file opening stuff, histogram still broken
ahahahahaha what the fuck was i thinking

this works now; i am a moron