Theory and practice of a portable photosynthesis instrument