Extract the local parameters for calculations


        .. currentmodule:: dnaMD

        Parameters
        ----------
        dna : :class:`dnaMD.DNA`
            Input :class:`dnaMD.DNA` instance.

        bp : list
            List of two base-steps forming the DNA segment.
            For example: with ``bp=[5, 50]``, 5-50 base-step segment will be considered.

        frames : list
            List of two trajectory frames between which parameters will be extracted. It can be used to select portions
            of the trajectory. For example, with ``frames=[100, 1000]``, 100th to 1000th frame of the trajectory will be
            considered.

        helical : bool
            If ``helical=True``, helical base-step parameters are extracted. Otherwise, by default, base-step parameters
            are extracted.

        Returns
        -------
        time : numpy.ndarray
            1D numpy array of shape (nframes) containing time
        array : numpy.ndarray
            2D numpy array of shape (6, nframes) containing extracted parameters.

def extractLocalParameters(self, dna, bp, helical=False, frames=None):
        """Extract the local parameters for calculations


        .. currentmodule:: dnaMD

        Parameters
        ----------
        dna : :class:`dnaMD.DNA`
            Input :class:`dnaMD.DNA` instance.

        bp : list
            List of two base-steps forming the DNA segment.
            For example: with ``bp=[5, 50]``, 5-50 base-step segment will be considered.

        frames : list
            List of two trajectory frames between which parameters will be extracted. It can be used to select portions
            of the trajectory. For example, with ``frames=[100, 1000]``, 100th to 1000th frame of the trajectory will be
            considered.

        helical : bool
            If ``helical=True``, helical base-step parameters are extracted. Otherwise, by default, base-step parameters
            are extracted.

        Returns
        -------
        time : numpy.ndarray
            1D numpy array of shape (nframes) containing time
        array : numpy.ndarray
            2D numpy array of shape (6, nframes) containing extracted parameters.
        """

        frames = self._validateFrames(frames)
        if frames[1] == -1:
            frames[1] = None

        if (len(bp) != 2):
            raise ValueError("bp should be a list containing first and last bp of a segment. See, documentation!!!")

        if bp[0] > bp[1]:
            raise ValueError("bp should be a list containing first and last bp of a segment. See, documentation!!!")

        if (bp[1] - bp[0]) > 4:
            print("WARNING: this is a local property and therefore, longer than 4 base-step may not be suitable..." )

        if not helical:
            time, shift = dna.time_vs_parameter('shift', bp=bp, merge=True, merge_method='sum')
            shift = np.asarray(shift) * 0.1  # conversion to nm

            time, slide = dna.time_vs_parameter('slide', bp=bp, merge=True, merge_method='sum')
            slide = np.asarray(slide) * 0.1  # conversion to nm

            time, rise = dna.time_vs_parameter('rise', bp=bp, merge=True, merge_method='sum')
            rise = np.asarray(rise) * 0.1  # conversion to nm

            time, tilt = dna.time_vs_parameter('tilt', bp=bp, merge=True, merge_method='sum')

            time, roll = dna.time_vs_parameter('roll', bp=bp, merge=True, merge_method='sum')

            time, twist = dna.time_vs_parameter('twist', bp=bp, merge=True, merge_method='sum')

            array = np.array([shift[frames[0]:frames[1]], slide[frames[0]:frames[1]], rise[frames[0]:frames[1]],
                              tilt[frames[0]:frames[1]], roll[frames[0]:frames[1]], twist[frames[0]:frames[1]]])
            time = time[frames[0]:frames[1]]

        else:
            time, x_disp = dna.time_vs_parameter('x-disp', bp=bp, merge=True, merge_method='sum')
            x_disp = np.asarray(x_disp) * 0.1  # conversion to nm

            time, y_disp = dna.time_vs_parameter('y-disp', bp=bp, merge=True, merge_method='sum')
            y_disp = np.asarray(y_disp) * 0.1  # conversion to nm

            time, h_rise = dna.time_vs_parameter('h-rise', bp=bp, merge=True, merge_method='sum')
            h_rise = np.asarray(h_rise) * 0.1  # conversion to nm

            time, inclination = dna.time_vs_parameter('inclination', bp=bp, merge=True, merge_method='sum')

            time, tip = dna.time_vs_parameter('tip', bp=bp, merge=True, merge_method='sum')

            time, h_twist = dna.time_vs_parameter('h-twist', bp=bp, merge=True, merge_method='sum')

            array = np.array([x_disp[frames[0]:frames[1]], y_disp[frames[0]:frames[1]], h_rise[frames[0]:frames[1]],
                              inclination[frames[0]:frames[1]], tip[frames[0]:frames[1]], h_twist[frames[0]:frames[1]]])
            time = time[frames[0]:frames[1]]

        return time, array