diffcalc for nsls2 prototype beamline applications