Thanks for doing that test, Mark, and for publishing the results. I should add that the rings also appeared with a Sigma lens that follows the AF-D standard and communicates f-stop and exposure with this camera body but does not autofocus on it. Presumably I could get rid of them by covering the lens contacts (it's a lens on which aperture is easy to set manually).
As I said in the private message, this confirms that I'm in my right mind after all. When I was doing my book project about 6 years ago, I bought this D5300 and used it extensively. I knew about the lossy compression >973 ADU but never encountered the hard-coded correction rings -- because, at the time, all the optics I used it on were non-electronic. Learning about the rings later, I was embarrassed that I hadn't detected them when I was doing my writing. But the real reason I didn't notice the problem is that it really wasn't there. Later I got a D5500, thinking it was much the same, but it has rings even with non-electronic optics.
I will continue using this D5300 for astrophotography when I don't need a filter-modified camera, taking care to keep the sky background and the flats just a hair to the left of the first line in the camera histogram, so that only the bright objects are above 973 ADU. Or if I can't hold to that, I'll simply use your repair tool. (Which I wonder if it could be made into a PixInsight plug-in.)
[Added: Looking back I see that you *did* make a PixInsight script for the D5300. I'll get it.]
Edited by Michael Covington, 14 May 2023 - 10:48 PM.