In the case of a qualifying vessel any of the income from which is not included in gross income by reason of section
883 or otherwise, the amount of notional shipping income from such vessel for the taxable year shall be the amount which bears the same ratio to such shipping income (determined without regard to this paragraph) as the gross income from the operation of such vessel in the United States foreign trade bears to the sum of such gross income and the income so excluded.