Exemplo n.º 1
0
    formatter = ticker.FormatStrFormatter('%d')
    ax.xaxis.set_major_formatter(formatter)
    plot(warmpix['year'], np.array(warmpix[thresh]) / npix)
    xlim(2000, 2020)
    ylim(-0.005, 0.251)
    xlabel('Year')
    ylabel('Fraction')
    title('Warm pixel fraction (Nominal and Worst)')
    draw()
    # savefig(thresh + '_' + case + '.png')

npix = 1024.0**2
secs2k = DateTime('2000:001:00:00:00').secs
sec2year = 1 / (86400. * 365.25)
yeardays = 365.25
alldarkcals = ParseTable.parse_table('darkcal_stats.dat')


def make_darkmaps(case='nominal', initial='pristine'):
    """Make dark current maps by degrading the CCD using the best-fit model
    from fit_evol.py"""

    date0 = DateTime('1999-05-23T18:00:00')

    if initial == 'pristine':
        # Start from a synthetic pristine CCD.  Probably no good reason to use this,
        # prefer starting from the pre-SSD-open dark cal on 1999223.
        dark = dark_models.pristine_ccd()
        darkcals = alldarkcals

    elif re.match('from|zero', initial):