def main():
    plot1 = xrtp.XYCPlot('star.03')
    plot1.caxis.offset = 6000
    plot2 = xrtp.XYCPlot('star.04')
    plot2.caxis.offset = 6000
    plot1.xaxis.limits = [-15, 15]
    plot1.yaxis.limits = [-15, 15]
    plot1.yaxis.factor *= -1
    plot2.xaxis.limits = [-1, 1]
    plot2.yaxis.limits = [-1, 1]
    plot2.yaxis.factor *= -1
    textPanel1 = plot1.fig.text(
        0.89, 0.82, '', transform=plot1.fig.transFigure,
        size=14, color='r', ha='center')
    textPanel2 = plot2.fig.text(
        0.89, 0.82, '', transform=plot2.fig.transFigure,
        size=14, color='r', ha='center')
    #==========================================================================
    threads = 4
    #==========================================================================
    start01 = shadow.files_in_tmp_subdirs('start.01', threads)
    start04 = shadow.files_in_tmp_subdirs('start.04', threads)
    rmaj0 = 476597.0
    shadow.modify_input(start04, ('R_MAJ', str(rmaj0)))
    angle = 4.7e-3
    tIncidence = 90 - angle * 180 / np.pi
    shadow.modify_input(
        start01, ('T_INCIDENCE', str(tIncidence)),
        ('T_REFLECTION', str(tIncidence)))
    shadow.modify_input(
        start04, ('T_INCIDENCE', str(tIncidence)),
        ('T_REFLECTION', str(tIncidence)))
    rmirr0 = 744680.

    def plot_generator():
        for rmirr in np.logspace(-1., 1., 7, base=1.5) * rmirr0:
            shadow.modify_input(start01, ('RMIRR', str(rmirr)))
            filename = 'VCM_R%07i' % rmirr
            filename03 = '03' + filename
            filename04 = '04' + filename
            plot1.title = filename03
            plot2.title = filename04
            plot1.saveName = [filename03 + '.pdf', filename03 + '.png']
            plot2.saveName = [filename04 + '.pdf', filename04 + '.png']