Pixel rounding and propagating error

For all your discussion of canon policies, evidentiary standards, and other meta-debate issues.

Discussion is to remain cordial at all times.
Post Reply
Jedi Master Spock
Site Admin
Posts: 2164
Joined: Mon Aug 14, 2006 8:26 pm
Contact:

Pixel rounding and propagating error

Post by Jedi Master Spock » Sun Aug 12, 2007 7:47 pm

I was, as it so happens, reading over vivftp's new photon torpedo calcs thread and noticing a few things.

Namely, in the OP, vivftp asked if the audience thought the new calcs were more accurate than his old calcs, and that reminded me that I didn't see any stated MOEs for pixel measurements.

In many cases, pixel rounding, fully propagated, is one of the most significant sources of scaling error in this sort of field. The problem comes in how carefully you count pixels - do you report a +/- 2 px error, or a +/- 1 px error?

I'm of the opinion that if you are exceptionally careful with counting pixels, you can split the difference on the partial pixels (i.e., pixels that are between the feature and background colors) and thus get the measurement to +/-1 px in many cases. For example, if there are two 50% pixels at the end of a line, you could count one of them, and be assured that you are almost certain to be within one pixel.

However, if you're not being exceptionally careful, you could easily be consistently overcounting or undercounting your pixels by one on each end, meaning that you should usually report +/-2 px if you're not examining very closely.

Now how do those errors propagate? Assuming that errors are independent, fractional error is propagated by the square root of the sum of the squares. When errors are dependent, they are simply added.

Let's take vivftp's OP in the thread linked to for an example. I'll assume the "exceptionally careful counting" model, although that's probably not justified. Involved in setting the scale for the picture he's counting the asteroid on ultimately are:

Electrical socket, 22 +/- 1 px.
Window, (348 +/-1 px)*2 +/-13 +/-1 px = 709 +/- sqrt(5) px*
Window, 14.3 +/-1 px
Timeship, 29.7 +/-1 px
Timeship, 20 +/-1 px
Torpedo, 4 +/-1 px
Torpedo, 3 +/-1 px

So the fractional MOE for the scale of the "Rise" image is, through these steps:

sqrt(1/22^2+5/709^2+1/14.3^2+1/29.7^2+1/20^2+1/4^2+1/3^2)=0.43

We'll ignore the pixel rounding on the asteroid - it's not significant compared with the pixel errors from everything else.

Meaning the figure for the asteroid dimensions could be generously reported here as 52 +/-22 meters for length and 34 +/- 14 meters for width. Just using the linear coefficient of the derivative actually falls apart for a MOE this wide; normally we would multiply the fractional MOE by three for a cubed value (+129%), but in this case, we actually would want to look at the cube (+200/-80% or so).

*Why sqrt(5)? Because the +/-1 px from the middle frame is independent of the +/-2 px from the two windows proper.

User avatar
Mr. Oragahn
Admiral
Posts: 6865
Joined: Sun Dec 03, 2006 11:58 am
Location: Paradise Mountain

Post by Mr. Oragahn » Mon Aug 13, 2007 1:41 am

Ah yes, I wanted to refer to that thread in the "isoton" one.

Without reading all that detailed stuff you wrote (I'll read it later on when I'll be freshier), it's easy to notice the problem of his measurements.

Instead of using the visual of Rise only, and taking the size of the torp from the moment it exits the tube, he uses at least two different sources, where the torps could be different, set to different yields (obviously, they are), and have the shield glow be larger or smaller.

Besides, there's just so much intermediary scalings that it's literally asking for error creep.

Finally, using the explosion inside the asteroid, above all based on Wong's calculator, is most problematic.

I find RSA's methods much more simple and accurate.

User avatar
Mr. Oragahn
Admiral
Posts: 6865
Joined: Sun Dec 03, 2006 11:58 am
Location: Paradise Mountain

Post by Mr. Oragahn » Sun Sep 02, 2007 1:15 am

As I also noted in this thread, the visuals of the torpedo as it's leaving the tube don't match with the visuals of the torpedo after it's been fired. There's also the issue of the torpedo glow on the ship itself interfering with a lot of the frames for scaling.

As also covered in this thread, it's been established that these are the same class torpedo Voyager was launched with and carried on board as part of their standard arsenal until much later.
Ok. This is interesting. I liked your interpretation of the 200 isoton thingy, putting each class 6 at a yield of 6.25 IT. which solves a couple of problems.
There really isn't any reason to believe torpedo glow size varies at all within the same class torpedo. There's zero reason to believe things like yield have anything to do with the properties of the torpedo glow.
Directly no, sure, but I suspect that you may wish to boost the torp's shields if it was set to a yield of 100 MT, for example, instead of 1 ton of TNT or so.
But let's put this behind.
That's why I've chosen to go with the scaling which uses less scalings to reach a final conclusion.

I'll still be redoing the calc based on any possible half pixels and whatnot though to see what the range is.
Dramatic boost in firepower figure though. But I find them far more reliable.

I've done some work on your picture. I notice that there's a low wall in front the window, which is an important factor to determine the size of the torp in the end.

The complex hollow layout of the window is the part that's the most inside the whole window hole. The other thin bits arranged at right angles, which form rectangles and squares, appear to be farther from the room, something like 30 cm away from the more detailed structure. It's hard to know how far from these bits the low wall is.
When seen from outside, the structure of the window doesn't correctly match the structure seen from inside.
So a couple of approximations will still creep in anyway.

Image

It's not necessarily top accurate, notably when it comes to determine the perspective escape point, but there may be something here to help see how big the window is.
In it he argues basically the same point as I raised above, that torpedo glow size does increase after the torpedo has launched. He even notes this effect in Rise itself with the torpedos he's used to scale the whole thing. In other words he's admitting that the torpedo glow according to his figures was in the process of changing at the point he used for his scaling.
Well, I figure that the screencap correponds to a moment when the glow growth is ought to be complete, especially if, as he says, he start thinking that the torpedo is coming towards the camera, instead of being shot straight ahead of the ship.

I recognize that his page is old, lacks a couple of details, and notably has a mistake, when he says "In the last pic above, there are two small squares and an itty-bitty square. The top-most two are, from the left, the frame they think I should have used, and the frame I did in fact use to scale the torpedo", when talking about this (way too) small picture, while it's the left one, the first, which he used.

What is also confusing is the absence of the picture he used for the torp scaling. I'm not talking about the screencap, which he provides, but the actual picture with all the lines and keys to know how he really worked out the size.

We could probably find out, by comparing the warship version of the Voyager, with the screencap in question, but this should not be our job.

In the end, he obtained a torp (core glow?) roughly 5 meters wide, which fits within your figures.

Why I still prefer any work that's purely Rise based is because you know that there are less chances of letting VFX "size disagreements" creep in.


If you'd like to suggest a better way to calc it, then by all means it'd be appreciated. I know of no such way.
I know none. First, are the torps focused. I remember Data, back in TNG, proving how it took special work to actually make them be focused, somehow showing they were not. I don't know what's up about the class 6. Maybe they are.

Now, even without knowing if they are focused, and without knowing the cone if they are, we still know that we're talking about a surface detonation, which has more than enough power to vaporize the whole asteroid before it could even crack apart.

If the weapon is not focused, we know that 50% of the torp will be wasted, if not considerably more.

However, Mike Dicenso was kind to forward this information.

It's an estimation of what would basically happen with a 10 MT nuke planted in the core of a Golveka-like asteroid (S class).

According the detailed and recent computer simulation, the 10 MT bomb would approximatively vaporize material within a sphere which diameter corresponds to 1/3 of the asteroid's width (roughly 530 meters). So that's 176.66 meters.
Which gives a yield of 21.2 MT in Wong's calc.

Mmh... according to Wong's calculator, an internal explosion of 10 MT would entirely vaporize a 137.5 meters wide rock asteroid (hard granite). I don't know the figures are obtained, but I suppose they take into account enough energy before the asteroid could break up. However, he also aims at a conservative estimation, by using hard rock.


So, well, one thing for sure is that depending on the way the torp detonates, you should be ready to double the figure if it's not focused at all.

Post Reply