Skip to content
Snippets Groups Projects
Select Git revision
  • a04104cb19c1322a3cf0bb11c0ce2988ed5a8b1f
  • master default protected
  • add-clFFT_GetSize
  • add-dylib-target
  • counting-mallocs
  • remove-CPU-constraint
  • Add-PKGBUILD
  • HSA
  • clmathfft
  • longer_dft_support
  • current_fgrp_apps
  • current_brp_apps
12 results

test.single.2

Blame
  • Forked from einsteinathome / libclfft
    Source project has a limited visibility.
    • Heinz-Bernd Eggenstein's avatar
      20314512
      Bug #1608: clFFT use of native_sin , native_cos can cause validation problems · 20314512
      Heinz-Bernd Eggenstein authored
      experimental: -added alternative method for twiddle factor calc, using a smaller LUT (256 * float2 )
                     via Taylor series to 3rd order, seems to be almost as accurate as method with 2 bigger LUTs, but faster.
                    -improved method w/ 2 bigger LUTs to use LUTs of float2
                    -improved method using slow sin/cos functions (now uses sincos combined function), still slow
                    - preparaed plan struct to have method switchable at plan creation time.
      
                    TODO: load smaller LUT for Taylor series approx into shared mem.
      20314512
      History
      Bug #1608: clFFT use of native_sin , native_cos can cause validation problems
      Heinz-Bernd Eggenstein authored
      experimental: -added alternative method for twiddle factor calc, using a smaller LUT (256 * float2 )
                     via Taylor series to 3rd order, seems to be almost as accurate as method with 2 bigger LUTs, but faster.
                    -improved method w/ 2 bigger LUTs to use LUTs of float2
                    -improved method using slow sin/cos functions (now uses sincos combined function), still slow
                    - preparaed plan struct to have method switchable at plan creation time.
      
                    TODO: load smaller LUT for Taylor series approx into shared mem.
    plot_data.py 1.18 KiB
    import matplotlib.pyplot as plt
    import pandas as pd
    import numpy as np
    import os
    from tqdm import tqdm
    from oct2py import octave
    import glob
    
    filenames = glob.glob("CollectedOutput/*.txt")
    
    plt.style.use('paper')
    
    Tspan = 100 * 86400
    
    
    def maxtwoFinNoise(twoF, Ntrials):
        F = twoF/2.0
        alpha = (1 + F)*np.exp(-F)
        a = Ntrials/2.0*F*np.exp(-F)
        b = (1 - alpha)**(Ntrials-1)
        return a*b
    
    
    df_list = []
    for fn in filenames:
        df = pd.read_csv(
            fn, sep=' ', names=['dF0', 'dF1', 'twoF', 'runTime'])
        df['CLUSTER_ID'] = fn.split('_')[1]
        df_list.append(df)
    df = pd.concat(df_list)
    print 'Number of samples = ', len(df)
    
    fig, ax = plt.subplots()
    ax.hist(df.twoF, bins=50, histtype='step', color='k', normed=True, linewidth=1)
    twoFsmooth = np.linspace(0, df.twoF.max(), 100)
    # ax.plot(twoFsmooth, maxtwoFinNoise(twoFsmooth, 8e5), '-r')
    ax.set_xlabel('$\widetilde{2\mathcal{F}}$')
    ax.set_xlim(0, 60)
    fig.tight_layout()
    fig.savefig('allsky_noise_twoF_histogram.png')
    
    from latex_macro_generator import write_to_macro
    write_to_macro('AllSkyMCNoiseOnlyMaximum', '{:1.1f}'.format(np.max(df.twoF)),
                   '../macros.tex')
    write_to_macro('AllSkyMCNoiseN', len(df), '../macros.tex')