#! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt

if __name__ == "__main__":
    fn = 'cubic_shiftchange.dat'
    stepLength, abs_change, flux_change = np.loadtxt(fn, unpack = True)
    fig, axes = plt.figure(figsize = (8, 4), ncols = 2)
    axes[0].plot(stepLength, abs_change)
    axes[0].set_title('RMS change')
    axes[1].plot(stepLength, flux_change)
    axes[1].set_title('Flux change')
    for ax in axes:
        ax.set_xlabel('Shift length (pixels)')
        ax.set_ylabel('value change per pixel')

    plt.show()
    