utils.make_lightcurve: adding detrend