Beispiel #1
0
            roi_suffix += '_%i' % r
        directory_suffix += roi_suffix

    bfullresolution = False
    if bfullresolution:
        directory_suffix += '_fullres'

    blog = False

    channel_groups = (2, 2)
    #channel_groups = (4,4)
    #channel_groups = (5,5)
    i_main_channel = 0
    #i_main_channel = 12

    PlotTools.set_figure_font()

    xt = Crosstalk.Crosstalk(directory,
                             file_wildcard=file_wildcard,
                             rows=rows,
                             columns=columns,
                             datatype=datatype,
                             param=param,
                             num_skip_files=num_skip_files,
                             num_files=num_files,
                             num_files_ref=num_files_ref,
                             param_label=param_label,
                             param_unit=param_unit,
                             channel_groups=channel_groups,
                             roi=roi,
                             file_wildcard_offset=file_wildcard_offset,
Beispiel #2
0
    num_channel_groups = channel_groups[0] * channel_groups[1]

    show_channels = None
    #show_channels = 0
    #show_channels = [0,2]
    nbins = 100
    #nbins = 'fullresolution'
    linewidth = 2.5
    #linewidth = 0.0
    rotation_xlabel = 0

    bparam_cal = False

    directory_suffix = 'v0'

    PlotTools.set_figure_font(xlabelsize=12)

    #########
    # Noise #
    #########
    '''
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150710\\741w01#48A1_baseline1_corr_latch_VANA1.7V_Noise_scan_20150710_134514"
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150724\\752w04#66A2_baseline1_corr_latch_VANA1.7V_Noise_scan_20150724_142145"
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150724\\752w04#66A2_baseline1_corr_latch_VANA1.7V_Noise_scan_20150724_150357"
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150724\\752w04#66A2_baseline1_corr_latch_VANA1.7V_Noise_scan_20150724_151134"
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150724\\752w04#75A1_baseline1_corr_latch_VANA1.7V_Noise_scan_20150724_151416"
    directory = "F:\\INVISAGE\\PC6\\Noise\\Data\\20150807\\752w04#48A1_Noise_scan_20150810_115932"
    directory = "F:\\INVISAGE\\PC6\\Conversion_gain\\Data\\20151023\\752w01#44A4_Noise_scan_20151023_170058"
    directory = "F:\\INVISAGE\\PC6\\Conversion_gain\\Data\\20151023\\752w01#64A4_Noise_scan_20151023_170836"
    directory = "F:\\INVISAGE\\PC6\\Conversion_gain\\Data\\20151023\\752w01#13A3_Noise_scan_20151023_170935"
    directory = "F:\\INVISAGE\\Q13S\\Bringup\\Data\\20151130\\imaging"
# write results into file:
f = open(os.path.join(dir_ana,'noise_results.txt'),'w')
f.write("Total temporal noise: %s\n"%(', '.join(str(v) for v in total_temporal_noise)))
f.write("Row temporal noise: %s\n"%(', '.join(str(v) for v in row_temporal_noise)))
f.write("Column temporal noise: %s\n"%(', '.join(str(v) for v in column_temporal_noise)))
f.write("Pixel temporal noise: %s\n"%(', '.join(str(v) for v in pixel_temporal_noise)))
f.close()

#PlotTools.plot_histogram(RMS,blog=True,bsave=False,xmin=None,xmax=None,xlabel='Total Temporal Noise [DN]',filename=os.path.join(directory,'hist_pixel_temporal_noise.png'))
#PlotTools.plot_histogram(numpy.array([RMS_pixel]),blog=False,bsave=False,xmin=0,xmax=20,xlabel='Pixel Temporal Noise [DN]')
#PlotTools.plot_histogram(numpy.array([RMS]),blog=False,bsave=False,xmin=0,xmax=20,xlabel='Total Temporal Noise [DN]')
#PlotTools.plot_histogram(numpy.array([RMS_row]),blog=False,bsave=False,xmin=0,xmax=20,xlabel='Row Temporal Noise [DN]')
#PlotTools.plot_histogram(numpy.array([RMS_column]),blog=False,bsave=False,xmin=0,xmax=5,xlabel='Column Temporal Noise [DN]')

#PlotTools.plot_histogram(numpy.array(RMS_pixel),blog=True,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise.png'))
PlotTools.plot_histogram(numpy.array(RMS_pixel),blog=True,xmin=5,xmax=15,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise.png'))
#PlotTools.plot_histogram(numpy.array(RMS_pixel),xmin=0,xmax=20,blog=True,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise.png'))
#PlotTools.plot_histogram(numpy.array(RMS_pixel),xmin=xmin,xmax=xmax,nbins=nbins,blog=True,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise.png'))
PlotTools.plot_histogram(numpy.array(RMS),nbins=nbins,blog=True,bsave=True,xlabel='Total Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_total_temporal_noise.png'))
PlotTools.plot_histogram(numpy.array(RMS_row),nbins=nbins,blog=True,bsave=True,xlabel='Row Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_row_temporal_noise.png'))
PlotTools.plot_histogram(numpy.array(RMS_column),nbins=nbins,blog=True,bsave=True,xlabel='Column Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_column_temporal_noise.png'))

#PlotTools.plot_histogram(numpy.array(RMS_pixel),nbins=nbins,blog=False,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise_linear.png'))
PlotTools.plot_histogram(numpy.array(RMS_pixel),nbins=nbins,blog=False,xmin=xmin,xmax=xmax,bsave=True,xlabel='Pixel Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_pixel_temporal_noise_linear.png'))
PlotTools.plot_histogram(numpy.array(RMS),nbins=nbins,blog=False,bsave=True,xlabel='Total Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_total_temporal_noise_linear.png'))
PlotTools.plot_histogram(numpy.array(RMS_row),nbins=nbins,blog=False,bsave=True,xlabel='Row Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_row_temporal_noise_linear.png'))
#PlotTools.plot_histogram(numpy.array(RMS_column),nbins=nbins,blog=False,xmin=0,xmax=3,bsave=True,xlabel='Column Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_column_temporal_noise_linear.png'))
PlotTools.plot_histogram(numpy.array(RMS_column),nbins=nbins,blog=False,bsave=True,xlabel='Column Temporal Noise [DN]',filename=os.path.join(dir_ana,'hist_column_temporal_noise_linear.png'))

#print RMS_pixel[0].shape
#print RMS_pixel[1].shape