sid5432 / pyOTDR

Simple OTDR SOR file parser written in Python
GNU General Public License v3.0
71 stars 28 forks source link

Suggestions #40

Open aleko205 opened 2 years ago

aleko205 commented 2 years ago

Guys, during testing the pyOTDR, I found 3 issue, which would be nice to fix/update them.

  1. In dump json file, order of event is based on alphabet (not numeric), that's why in case of many events, after "event 1" is coming "event 10" and after that - "event 2". it would be nice if it is possible to order them by the numeric EventId.
  2. Distances in a dump file are shown in a KM and it is rounded. It would be more useful to be it in a meters. In my case distance was 1440.59 meter and in a dump was written 14.410 . I know it isn't big deviation but it would be nice dump the exact value which is given from a source .sor file.
  3. And last one and important for me :) - pyOTDR in a detail table (KeyEvents) is writing 0.000 , even in that case when there is a NULL(empty value) (as it is shown in Fiber trace viewer) and it would be nice to make different between 0.000 and NULL and write a NULL when is a NULL and write a 0.000 when is a 0.000.

P.S. If you know where can I find type of events which is unknown for the pyOTDR? Types such as - 2E99992P, 1E99992P, 0E99992P, 1F99992P, etc. If it will be a hint for you, I received it from device MTS-6000A 8146 SRL and during test was used the OTDR launch cable.

Thank you again for you great job

RemiDesgrange commented 2 years ago

Pretty legit!

For unknown types, I can try finding in the doc of the OTDR what is supposed to be in these blocks, but that need to be sponsored/funded.

RemiDesgrange commented 2 years ago

Ok I must admit I haven't worked with SOR file in a while :sweat_smile:

regarding the meter vs kilometer situation, the sor file indicate the unit used to store distance, I only saw kilometer but you may be able to configure your OTDR to store meter in the trace instead of kilometers.

aleko205 commented 2 years ago

@RemiDesgrange I can share my .sor file publicly without problems and here you are - https://bit.ly/3oR9Ru9 This file is good example because there are 11 event and you can find empty (NULL) values (Please see an examples on the screenshot from my viewer - https://prnt.sc/26wdge8 ). Also in this file you can find in distance field that value are in a km and for example in event 1 is writing 0.17154 and pyOTDR is writing 0.172 which of course of are not equal.

thank you

RemiDesgrange commented 2 years ago

image (i'm adding the image here for reference).

Thanks a lot ! I'll look at this file ASAP :+1:

Hanzoandgenji commented 2 years ago

@aleko205 Hello, I also encountered the three problems you mentioned earlier. Question 1: I use the regular library to find numbers and then reorder them according to the numbers. Question 2: I use the mathematical method to reset the unit conversion, but question 3: an error valueerror: read length must be non negative or -1 occurs when parsing the SOR file. Is there a solution? How can I get json file without use pyOTDR?

thank you!

RemiDesgrange commented 2 years ago

I stumble upon https://github.com/JamesHarrison/otdrs for which his author had access to the specification. You can try parsing your SOR with this tool to see if it feats your need. I do not have the bandwidth currently to fix this issue.