First of all, thank you for posting this, this looks like a formidable effort!

I will have to look at it again in more detail later but you seem to be using something like SFDR in your ENOB definition except you are counting noise bins as "peaks", is this correct? I see two problems with this:

1) The power of a noise bin is dependent on the (arbitrarily chosen) FFT length. In case the largest "peak" is a noise bin, the ratio is essentially meaningless. A normal SFDR measurement would use a sufficiently long signal to ensure that the largest spur/harmonic is clearly above the noise floor and the ratio is always taken between two tones.

2) This would actually be a strictly less stringent measure than "conventional" SINAD. You are comparing the signal power to that of the largest non-signal bin. SINAD (the way I would define it) involves the sum of *all* the other bins.