  We present a method for the in-flight relative flux self-calibration of a
spectro-photometer instrument, general enough to be applied to any upcoming
galaxy survey on satellite. The instrument response function, that accounts for
a smooth continuous variation due to telescope optics, on top of a
discontinuous effect due to the segmentation of the detector, is inferred with
a $\chi^2$ statistics. The method provides unbiased inference of the sources
count rates and of the reconstructed relative response function, in the limit
of high count rates. We simulate a simplified sequence of observations with
realistic distributions of sources and count rates, with the purpose of
quantifying the relative importance of the number of sources and exposures for
the correct reconstruction of the instrument response. We present a validation
of the method, with the definition of figures of merit to quantify the expected
performance, in plausible scenarios.
