""" 
The main purpose of this script is to allow to print values of the points from Rotational Diagram.

To test this script:
    1. open a Rotational Diagram window, load the data file CCS.rotd in cassis_path/delivery/data/, and display
    2. run this script

Author: J-M. Glorian
Author: M. Boiziot
Date: 01/21/16
Version: 1
Licence: CeCILL-C
Tested on: CASSIS 6.5
"""

# The imports
from eu.omp.irap.cassis.gui import PanelView
from eu.omp.irap.cassis.gui.plot.rotdiagram import RotationalValue


# Get the first series (start at 0) then print information about each point.
pts = PanelView.getInstance().getRotationalView().getChartPanel().getChart().getXYPlot().getDataset(RotationalValue.DATA).getSeries(0)
for i in range(0, pts.getItemCount()):
    print(pts.getX(i))
    print(pts.getYLowValue(i))
    print(pts.getYHighValue(i))
    print(pts.getYValue(i))
