1

I am a complete newby in python and data processing. So many apologies in advance, if my question will seem to you evident or stupid.

I need to treat the graphical data like this:

Fig.1

The goal is to measure the surface of the parts, like drawn here:

Fig.2

and to measure the heights of the parts like this:

Fig.3

Right now I have downloaded pandas, numpy and matplotlib libraries to work with graphics. Could someone tell me if I need some additional libraries to perform such an analysis?

And the main question: Does somebody know the ways to perform the treatment of the graphs, like described above? Is it feasible in python?

Thank you in advance and have a nice day!

George Profenza
  • 50,687
  • 19
  • 144
  • 218
Kirill
  • 19
  • 1
  • Surface of plots - how about https://stackoverflow.com/questions/13320262/calculating-the-area-under-a-curve-given-a-set-of-coordinates-without-knowing-t – Zubo Sep 16 '20 at 11:12
  • Height of a plot - please elaborate. The plot itself comes (I assume) from a set of coordinate pairs (x,y), so you can just look that up? – Zubo Sep 16 '20 at 11:14
  • Hello George ! thanks a lot ! Concerning the height of plot I need to find a way to get an average "y" values for the different sections of the graph. But here is another question: how to divide the graph into these sections in semiautomatic/automatic mode (in other words, how to describe these conditions)? – Kirill Sep 16 '20 at 11:25
  • So, basically, you want to turn this function into a rectangular one, where each plateau would correspond to a section average? – Zubo Sep 16 '20 at 11:32
  • @Kirill I'm not an expert, but it looks like you're on the right track with numpy/pandas...additionally scipy / scikit-learn have some good tools. Applying signal processing / statistical methods using the tools should help. One naive approach I can think is marking transitions from from low to high or high to low values. Once you have that hopefully the red area can be described by lowest value above the overall average (~75). It maybe error prone, but a start. You can look at smoothing the signal as well. – George Profenza Sep 16 '20 at 11:50
  • If you know those 3 sections will roughly be in the similar sections (20 to 60nm) you could make use of that too, just be aware how your real world data will change – George Profenza Sep 16 '20 at 11:51
  • Thanks for your reply! Yeah, for measuring heights I'd like to approximate the graph sections by plateaus. – Kirill Sep 16 '20 at 13:49

0 Answers0