[PX716A] Plextools/pxscan under Linux: some progress!

vbimport

#1

Hi !

A couple of days ago, I posted about using a PX-716A under Linux, not only for burning but also to access Q-checks. And some progress have already been made :slight_smile:
I contacted Alexander Noe, who is the author of Pxview/Pxscan and he was very helpful. He kindly gave me the code source of his work, and I have begun to adapt it under Linux. It was difficult at the beginning, but I begin to get some results.

To summarise:

  • burning under Linux is easy, especially using graphical frontends like k3b (a Nero-like).
  1. burning a CD: use cdrecord. It handles a lot of options, including Burnproof, Varirec, Gigarec, and PoweRec (forcespeed).
  2. burning a DVD: there are several solutions. Either:
  • cdrecord with DVD support.
  • growisofs, from the dvd+rw-tools project (which is good for all DVD-/+R(W)). This one is popular, since it is used by k3b to burn DVDs. However, it does not support forcespeed or varirec yet.

Most distributions include these tools and you don’t have to install them yourself.

Now, the Q-checks. Thanks to Alexander Noe, I have begun to adapt his pxscan code to Linux. I made a “quick and dirty” adaptation of his code and now I can:

  • do the TA scan. I checked it was consistent with Windows results.

$ ./ta_check /dev/hdc

running TA on L0 inner zone .........
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 2 0 5 8 12 37 69 114 204 410 744 1242 2006 2957 4097 5352 6009 6140 5470 4183 2922 1542 715 271 77 18 3 0 3 43 209 734 1813 3657 5691 6727 6231 4624 2694 1115 381 89 18 0 1 0 0 3 13 89 324 930 1999 3412 4405 4619 3686 2296 1132 453 135 24 6 1 0 0 0 3 4 19 65 242 690 1259 2105 2764 2906 2522 1860 1040 443 173 57 6 2 0 0 0 0 0 2 5 24 117 282 633 1164 1759 1956 1786 1295 779 384 133 36 10 2 1 0 0 0 0 0 1 23 63 199 451 704 1074 1196 1029 750 444 193 51 13 6 0 0 0 0 0 0 2 6 17 52 143 281 462 534 586 493 330 189 83 13 6 1 0 0 0 0 0 0 5 18 35 94 156 266 323 359 343 237 153 66 23 5 3 0 0 0 00 0 0 1 2 10 22 36 52 59 63 55 31 21 10 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 5 13 42 83 97 105 57 37 11 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42
9 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 3 13 54 175 500 1170 2547 4254 5957 6989 7267 6167 4436 2828 1342 536199 40 7 1 4 8 55 154 493 1230 2164 3570 5033 5823 5805 4362 2891 1503 619 183 40 1 0 1 1 14 59 191 396 890 1605 2636 3555 3863 3974 3026 1955 1040 405 130 34 7 0 0 0 0 1 6 15 50 145 322 682 1286 1991 2564 2725 2520 1905 1167 570 221 75 22 2 0 0 0 0 8 19 79 184 367 621 1114 1415 1763 1663 1350 927 522 215 62 16 1 0 0 0 1 2 6 25 66 107 228 345 581 803 911 957 807 617 368 157 62 25 3 0 0 0 0 1 3 13 37 68 155 286 395 548 515 496 353 223 111 32 11 3 0 0 0 0 2 4 6 19 47 72 120 181 258 276 301 279 215 146 72 32 10 2 0 0 0 0 0 0 1 1 2 8 28 41 50 78 76 54 39 26 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 18 40 58 86 85 81 37 20 5 2 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 46
  peak shift pits :    2   0  -1  -2  -1  -1   0  -1   0  -1
  peak shift lands:    2   0  -1   0   0   0   0   0   0   1
running TA on L0 middle zone.........
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 2 1 0 3 1 3 3 2 4 13 19 21 33 81 114 202 334 473 658 973 1301 1708 2263 2630 3193 3453 3784 3945 4028 3668 3497 2790 2203 1480 894 468 308 400 743 1358 2308 3521 4293 4887 4849 4269 3416 2233 1230 551 177 50 10 1 3 7 35 132 361 877 1775 2974 3790 4318 3741 2724 1562 788 277 104 18 6 0 0 0 2 2 21 133 287 732 1377 2112 2675 2798 2391 1692 1121 516 210 60 14 7 1 0 0 0 0 0 0 4 21 64 222 489 951 1554 1876 1961 1457 920 511 213 65 21 3 5 0 0 0 0 0 5 26 53 150 330 619 858 1056 1057 845 596 334 180 50 19 4 1 0 1 0 0 1 10 27 75 150 241 413 548 591 491 305 193 99 24 10 5 1 0 0 0 0 3 13 32 79 129 217 260 293 295285 183 105 66 27 10 6 0 0 0 0 0 0 0 2 6 11 19 38 48 62 53 44 30 16 10 7 2 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 7 29 65 94 96 73 46 29 13 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
35 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 5 19 46 167 355 719 1368 2351 3438 4774 6039 6590 6272 5117 3545 2088 1054 453 160 59 29 45 110 175 391 686 1078 1551 2243 3065 3828 4557 4762 4224 3299 2225 1230 525 178 60 31 48 91 192 380 671 1047 1641 2243 2689 3026 3212 2859 2272 1468 840 380 137 42 12 18 27 71 166 216 411 615 912 1196 1719 1897 1988 1989 1737 1417 934 546 262 104 45 9 3 9 15 48 73 177 236 327 535 703 910 1030 1200 1264 1218 1024 770 488 202 99 18 6 3 1 3 15 29 75 93 159 248 311 467 541 683 700 771 679 579 383 254 149 41 11 1 4 9 14 26 45 82 102 167 211 270 359 380 393 383 355 230 155 71 24 8 1 0 0 4 6 19 30 32 59 82 121 131 173 221 199 255 206 169 111 52 31 14 2 0 0 4 2 4 5 7 12 20 39 40 49 44 56 33 29 25 9 1 0 0 0 1 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02 5 14 55 76 93 89 59 30 10 3 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33
  peak shift pits :    4  -1  -2  -3  -1  -1   0  -2  -1  -1
  peak shift lands:    2   0  -1  -2  -1   0   0   0   0   2
running TA on L0 outer zone .........
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 1 3 6 19 28 76 122 238 390 601 894 1136 1567 2058 2600 3265 3851 4423 4854 4802 4334 3494 2554 1672 859 364 150 60 39 81 246 653 1460 2764 4244 5411 5890 5220 3754 2265 1077 450 168 35 12 1 0 0 12 54 189 615 1418 2662 4037 4636 4176 3104 1759 783 272 67 17 6 0 0 0 0 0 5 15 50 202 479 1083 1886 2754 3103 2744 2005 1157531 181 54 10 2 0 0 0 0 0 0 1 12 31 113 308 695 1172 1636 1854 1756 1305 828 429 150 37 130 0 0 0 0 0 2 14 50 138 354 635 920 1120 1061 916 597 315 147 41 18 6 1 0 0 1 0 1 4 15 54 138 229 401 577 635 488 363 243 111 39 7 1 1 0 0 0 0 0 4 6 18 41 110 193 304 382 353 274 158 86 29 20 3 1 0 0 0 0 0 0 0 1 5 10 20 34 37 64 59 55 27 18 4 2 1 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 12 25 48 11588 61 59 21 9 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17
34 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 11 28 119 318 916 1905 3596 5657 7390 7955 6975 4682 2726 1280 524184 80 41 9 7 9 40 160 417 918 1756 3057 4389 5504 5727 5007 3734 2091 955 350 76 24 5 5 26 102 218 460 849 1496 2253 3008 3499 3504 3048 2430 1399 693 306 69 16 2 0 0 2 11 20 81 148 295 475 737 1085 1492 1921 2238 2253 2026 1577 999 504 216 76 19 4 1 1 5 5 15 55 120 181 320 551 792 1113 1372 1559 1444 1239 814 502 239 71 22 7 0 0 0 3 12 25 43 117 179 345 495 695 894 912 893 710 490 246 106 35 4 0 1 0 1 3 6 25 55 98 187 265 367 472 518 482 400 252 124 52 22 5 2 0 0 0 4 8 13 37 55 101 147 208 252 289 305 252 160 104 58 24 4 1 0 0 0 0 0 2 2 9 17 14 28 36 50 64 60 48 29 16 6 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 17 47 109 93 88 49 29 9 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26
  peak shift pits :    3   0  -2  -2   0  -1   0  -1   0  -1
  peak shift lands:    2   0  -2  -1   0   0   0   0   0   1

Explanation : the series of figures are the histogram values for the TA pits (1st row) and lands (2nd row), and the calculated peak shifts are from Alexander’s code. They show how the shift is (positive means slightly to the right, negative means slightly to the left, and 0 is perfectly centered)

  • set the gigarec factor
  • an embryo of PI/PIF check for CDs
  • read speed, set speed, read cd/dvd information (but this was possible with the dvd+rw-tools)
  • PIE/POF for DVDs should be straightforward.

Work to do:

  • a graphical interface. For the moment, I have the equivalent of pxscan : data results, but no graphical output. This should be easy, using preexisting graphical tools, like gnuplot.
  • polish the code. What I did is very dirty, there is no error checkings
  • add support for Varirec/PoweRec : easy because commands are already available in cdrecord.
  • permissions: some options are only available when done as root, like the TA scan. However, it is possible to give root permission inside the code and I have to learn how to do it securely.
  • status of code. Alexander gave me permission to share the code, but I have to discuss more about the terms. Probably it will be under a Free license (GPL would be perfect to incorporate to growisofs/dvd+rw-tools).

The next step would be to add these options to dvd+rw-tools.

I will try to release something in two weeks.
Again, a big thanks to Alexander Noe, who made the hard work : finding the SCSI commands to pilot the drive, and interpreting the data output.


#2

zeb_ thanks for your work (and Alexander of course) :slight_smile:

Ps. Did you re-register? I see only one post under your username?


#3

Yes, I reregistered. I wanted to be consistent in various forums :bigsmile:


#4

BTW, the current code fails to calculate the peak shift of stuff like this

If anyone has a solution for that, i’m listening…


#5

Mmmmh… Maybe the code fails to detect the maximum of each peak ? Do you have the numeric values of ta_results_pit and land ?
BTW, the Plextools fail as well. They say the peak shift is bad, giving a score of 1. For me, the jitter is terrible, but not the peak shift. They are quite correctly centered in my opinion. WDYT ?


#6

As you can see, there is no “peak” for example for Pit T Freq @ 9 and 11

BTW, the Plextools fail as well. They say the peak shift is bad, giving a score of 1. For me, the jitter is terrible, but not the peak shift. They are quite correctly centered in my opinion. WDYT ?
The same. But that the PlexTools fail as well doesn’t mean it can’t be done :stuck_out_tongue:


#7

Sure :slight_smile:

Here is what I propose : we have a pattern minimum, max, minimum, max, and so on… Even for 9 to 11, it seems a maximum can be found between two minima. So minima are each time a new boundary that would reset the next maximum. And this would be this maximum that would be used for testing the peak shift. I don’t know if this is feasible easily though.
Also, how do you plot the peak graphs, using the pit and land histograms ?


#8

Another way : let’s calculate the differential between two successive value. When the differential is at a minimum, we have reached either a max or a min. Of course, for peaks like 9 to 11, we would reach a lot of these -> discard the jitter result or give a bad quality anyway.


#9

The problem is finding the minima, actually (the maxima are easy once you have the minima, because they usually are pretty close to the point which has one half to the left, the other half to the right). It is difficult not to misjudge one of the minima after 11 as a “real” minimum.

The plot is just a graph where x = <index in the ta_reponse_blah array>, y = log10(ta_reponse_blah[x])


#10

Maybe the method with differentials can help to find minima. I will try in a spreadsheet. Anyway, if it cannot find it, it has to be labelled as “bad”. But obviously, tests should be made.

EDIT : sorry for my post in French… :wink:


#11

Another idea… our max anyway has to be restricted between two vertical lines (“3.5” and “4.5”). Otherwise the burning is pure garbage anyway. So the search for the maxima could be restricted to these timings.
In the case of 11, there would be one maxima, probably near 11-5.

but there are probably more elegant ways to analyse this, mathematically.


#12

PxScan v1.5, built Feb 15 2005 11:15:04
 performing TA scan
 output file for results: ritek_01.pxd

Looking for drives...
Drive 0:0:0: PLEXTOR  DVDR   PX-712A   1.05 
Drive 1:0:0: PLEXTOR  DVDR   PX-716A   1.04 
  reading current gigarec setting: gigarec off
disc type: DVD-R/W
book type: DVD-R
layers   : 1 
drive serial number: 153669  
manufacturer id: RITEKG01
trying to set speed to 2x
running TA on L0 inner zone .........
  Histogramme: 
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    1    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    3    8   17   45   81  162  239  445  671 1041
     1487 2074 2719 3277 3899 4369 4496 4418 4084 3336 2659 1873 1237  742  430
      209  105  113  182  323  660 1136 1827 2639 3595 4205 4546 4296 3851 2788
     1910 1158  652  277  125   49   25   18   27   48  124  241  600  956 1621
     2299 2819 3214 3143 2902 2143 1500 1023  531  247  114   45   36   44   81
      143  325  589  874 1280 1663 1870 2078 2011 1736 1365  990  603  393  238
      109   52   23   35   55  107  209  326  512  704  971 1085 1217 1168 1117
      933  712  538  331  210  123   80   31   28   38   69  119  176  254  358
      447  561  599  627  659  552  485  414  274  174  135   75   35   22   14
       18   48   64  100  141  211  234  288  314  340  291  282  237  191  130
      103   61   42   23   20   11   29   35   43   56   67  131  148  195  184
      199  194  169  135  100   82   55   39   22    6    8    7    3    4    5
       14    9   23   26   31   25   40   35   29   28   20   12   12   13    7
        2    1    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        2    2    2   10    9   14   21   24   33   52   55   46   33   26   37
       25   11    7    4    4    1    1    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0
  peak shift pits :    2   0   0  -1  -3  -3  -4  -4  -5  -5
  peak shift lands:    1   0  -2  -2   0   0   0   0   0   0
running TA on L0 middle zone.........
  Histogramme: 
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    1    0    0    0    0    0    0    0    0    0    0
        0    0    2    2    4    5   14   33   57  105  153  233  383  593  858
     1174 1592 2016 2521 3054 3544 3918 4164 4183 3707 3362 2682 2128 1470  979
      635  438  307  359  556  845 1277 1905 2708 3362 3894 4188 3973 3548 2846
     1953 1292  765  415  220  123   65   57   98  156  349  534  951 1360 2033
     2464 2806 2931 2729 2325 1723 1207  778  477  286  131   99   92  153  231
      407  610  961 1134 1462 1644 1797 1736 1673 1329 1027  729  509  341  212
      121   90   96  122  179  254  418  571  669  845  927 1014 1021  963  813
      703  566  466  328  231  157   90   94   75   94  125  197  253  358  437
      482  546  544  573  494  458  410  351  259  177  133   78   74   66   55
       56   84  104  141  169  228  246  262  284  256  269  244  227  166  152
       93   86   55   34   27   25   47   53   57   83  114  109  143  160  130
      178  147  148  113  116   67   51   45   42   24   12   15    6   15   12
        7   19   24   24   24   25   27   24   27   11   20   18   16   14   10
        4    4    3    1    1    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    1    0    0    1    0    1
        2    2    5    5   13   16   24   42   41   37   50   40   37   43   39
       24   16   10    2    9    1    2    2    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0
  peak shift pits :    3   0   0  -2  -3  -4  -5  -4  -6  -5
  peak shift lands:    2   0  -2  -1  -1  -1   0   0   0   1
running TA on L0 outer zone .........
  Histogramme: 
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    1    0
        0    0    0    0    0    0    0    1    0    0    0    0    1    8    6
        9   16   24   51   56   76  103  145  227  295  364  531  705  864 1095
     1433 1683 1967 2371 2627 3018 3163 3239 3230 3122 2953 2577 2251 1833 1463
     1157  966  890  851 1018 1174 1548 1967 2351 2841 3081 3301 3296 2996 2682
     2117 1667 1205  832  563  375  246  270  302  434  569  803 1124 1548 1887
     2154 2315 2338 2268 1982 1630 1296 1056  706  469  385  316  307  368  479
      665  798 1011 1218 1307 1424 1429 1367 1243 1105  885  742  553  456  316
      246  220  242  301  349  392  539  566  649  780  746  823  753  753  646
      592  495  424  361  267  246  179  153  146  168  207  271  320  349  392
      383  404  458  432  411  346  360  315  266  243  180  165  141  118   91
      102  124  133  158  172  165  226  218  198  195  217  211  183  176  154
      124  114  100   88   69   69   59   80   82  103   94  130  112  118  126
      143  132  123  111  111   93   72   61   64   35   34   29   27   21   16
       18   11   18   29   28   20   18   25   25   38   20   13   16    9    8
        6    3    7    0    1    1    1    1    1    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    2    3
        9    1    6   10   15    7   19   20   37   36   36   40   38   25   38
       29   22   15   17   12    6    6    6    1    1    0    0    1    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0
  peak shift pits :    3   0   0  -2  -4  -4  -6  -4  -3  -4
  peak shift lands:    2   0  -3  -2  -1   0   1   0  -1   1

writing meta data                      ...
writing TA    results                  ...



This time it actually worked…


#13

Thanks, I’ll have a look.
BTW, there a a lot of links about histogram analysis. Some of them talk about “local minima and maxima” and I think it i what we are looking for. Now, I don’t know how high the mathematical level is. Worth noting it concerns a lot of people doing image analysis.


#14

Hehehe : http://wayne.cs.nthu.edu.tw/~jones/paper/thresholding/
and http://www.redbrick.dcu.ie/~bolsh/thesis/node28.html

Just search in google for:
histogram “finding local minima”
or
histogram “finding local maxima”
but a lot of methods are probably overkills for what we want imo.


#15
running TA on L0 middle zone.........
  Histogramme: 
        0    0    0    0    0    0    0    0    0    1    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    1    0    0    0    0    0    0    0    0    0    0    0
        1    0    0    3    4    8   12   44   72   95  183  249  388  595  824
     1181 1582 2036 2645 3210 3619 4045 4093 3960 3803 3339 2698 2067 1373  929
      567  360  349  347  591  870 1332 1982 2664 3452 3961 4150 4068 3369 2736
     2002 1306  765  468  198  112   43   49   98  158  321  566  985 1483 1954
     2436 2830 2900 2709 2255 1789 1209  864  466  249  138   79   91  137  263
      403  560  894 1135 1495 1708 1693 1711 1604 1334 1087  770  555  322  207
      130   92   83  110  175  247  382  544  700  821  928  966  953  984  889
      729  553  437  320  241  162   89   86   85   95  146  191  252  324  415
      463  555  544  554  532  485  406  332  263  191  123   89   51   54   72
       66   79  113  142  165  248  236  273  277  273  260  213  186  169  132
       99   75   52   35   43   35   52   42   62   83  114  153  134  122  170
      171  144  145  135  113   89   67   43   33   24   11    8    7    4   14
       10   25   12   23   22   20   23   21   35   18   26   12   21   11    6
        5    2    1    3    2    1    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    1    2    1
        0    3    3    4   12   18   19   28   41   44   42   43   44   48   33
       24   29   17   13    6    2    0    2    0    1    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
        0    0
  peak shift pits :    3   0   0  -2  -3  -5  -5  -5 -10 -67
  peak shift lands:    2   0  -2  -1  -1  -1   0   0  -1   0

Here is the problem…


#16

ooops


#17

Alexander, I just found this code. A matlab code for finding local min and max of an histogram of dicrete values:

************************* localpeaks.m
***********************************
function peaks = localpeaks(hx, low, high, minsep)
%LOCALPEAKS Find positions and magnitudes of local peaks.
%   This function searches for all local maxima in
%   a histogram between low and high search bounds.
%   INPUT:
%   hx     - input histogram vector
%   low    - lower bound to search for peaks 
%   high   - upper bound to search for peaks 
%   minsep - minimal allowed separation between adjacent peaks 
%   
%   OUTPUT:
%   peaks = [pv pi] - Output array with 2 columns:
%           pv has peak magnitudes from highest to lowest,
%           pi has corresponding peak positions (in samples).        

nx=length(hx); % total number of bins in a histogram
    
d=sign(diff(hx));

peaks = [];
flag = 0;

% Find all local maxima between low and high bounds
for i=low:high-1    
   if (d(i) == 1.0)
      flag = 1;
      nstart = i;
   elseif (d(i) == -1.0)
      if (flag == 1)
         flag = 0;
         nend = i;
         pi = i - floor((nend-nstart)/2.0);
         pv = hx(pi);
         peaks = [peaks; pv pi];
      end          
   end
end

[npeaks, junk] = size(peaks); % total number of peaks found

if (npeaks > 0)
 peaks=flipud(sortrows(peaks)); % Sort based on peak heights  
 
 % Optionally scan all peaks from highest to lowest and retain only 
 % those separated by at least minsep samples from already selected.
 if (minsep > 2)
   seppeaks = [peaks(1,:)];  % select highest peak first
   for i=2:npeaks            % analyze remaining peaks
     [np, junk] = size(seppeaks);
     count=0;
     for j=1:np
       if(abs(peaks(i,2)-seppeaks(j,2)) < minsep)
          count = count+1;         
       end 
     end     
     if (count == 0)
        seppeaks = [seppeaks; peaks(i,:)];
     end     
   end    
   peaks = seppeaks;  
 end   
 
end   
**************************************************************************

Despite this is interesting, still I think it is overkill. Just restrict to the max value between half timings and you will be accurate enough.


#18

you guys rock, great thread and great work!


#19

Thanks a lot.
With Alexander, we have just agreed to deposit our code under the GPL license on Sourceforge (or similar). This way, the source code will be made available for testing and development. I will deal with the Linux port (as far as I can do. I am a beginner in C++ but will do my best) and probably will try to :

  • produce a kind of Plextool equivalent in Gtk
  • merge the command-line work with the dvd+rw-tools of Andy Polyakov

#20

BTW, I have also found out the commands to manage the autostrategy database, so this should be possible on linux sooner or later as well