twod code now written

Some updates needed for different fitting and sub-pixel shifting not yet implemented