Ejemplo n.º 1
0
def show_dir_fft(path):
    dataobjs = dataio.loaddir(path)
    dv = datavis.data_viewer()
    for fname, dataobj in dataobjs.iteritems():
        ft = fft(dataobj)
        dv.add_object(ft, fname)
    return dv
Ejemplo n.º 2
0
def show_dir_fft(path):
    dataobjs = dataio.loaddir(path)
    dv = datavis.data_viewer()
    for fname, dataobj in dataobjs.iteritems():
        ft = fft(dataobj)
        dv.add_object(ft, fname)
    return dv
Ejemplo n.º 3
0
def show_dir(path):
    """Loads all known file formats in the specfied directory
    and launches data viewer.
    """
    dataobjs = dataio.loaddir(path)
    dv = datavis.data_viewer()
    for fname, dataobj in dataobjs.iteritems():
        dv.add_object(dataobj, fname)
    return dv
Ejemplo n.º 4
0
def show_dir(path):
    """Loads all known file formats in the specfied directory
    and launches data viewer.
    """
    dataobjs = dataio.loaddir(path)
    dv = datavis.data_viewer()
    for fname, dataobj in dataobjs.iteritems():
        dv.add_object(dataobj, fname)
    return dv
Ejemplo n.º 5
0
                                              fid_cutted['fid'],
                                              lb=FID_EXP_WEIGHTING)
        electronic_gain_factor = 10**(-ds['gain'] / 20.)
        small_flip_angle_factor = 1 / np.sin(np.radians(flip_angle))
        fid *= electronic_gain_factor
        fid *= small_flip_angle_factor
        fid_cutted *= electronic_gain_factor
        fid_cutted *= small_flip_angle_factor
        data_viewer.add_object(fid, '{}{} FID'.format(prefix, ds['data']))
        data_viewer.add_object(fid_cutted,
                               '{}{} FID (cut)'.format(prefix, ds['data']))


if __name__ == '__main__':
    common.configure_logging()
    dv = data_viewer()

    fid_file = 'ise14.dat'
    fid = load(os.path.join(data2013_dir, fid_file))
    fid['fid'] = weight_signal(fid.index, fid['fid'], lb=FID_EXP_WEIGHTING)
    dv.add_object(fid, 'FID: ' + os.path.basename(fid_file))
    fid_cutted = cut_fid(fid)
    dv.add_object(fid_cutted, 'FID[50:]: ' + os.path.basename(fid_file))
    ft = do_fft(fid_cutted)
    ft_cut = cut_fft(ft)
    dv.add_object(ft_cut, "FFT cut: " + os.path.basename(fid_file))

    theta, ft_phase_corrected = auto_phase_correct(ft_cut['fft'],
                                                   ft_cut.index,
                                                   step=0.5)
    integr = integrate.simps(np.imag(ft_phase_corrected), ft_cut.index)
Ejemplo n.º 6
0
                                       lb=FID_EXP_WEIGHTING)
            fid_cutted['fid'] = weight_signal(fid_cutted.index,
                                              fid_cutted['fid'],
                                              lb=FID_EXP_WEIGHTING)
        electronic_gain_factor = 10 ** (-ds['gain'] / 20.)
        fid *= electronic_gain_factor
        fid_cutted *= electronic_gain_factor
        data_viewer.add_object(fid, '{}{} FID'
                               .format(prefix, ds['data']))
        data_viewer.add_object(fid_cutted, '{}{} FID (cut)'
                               .format(prefix, ds['data']))

    
if __name__ == '__main__':
    common.configure_logging()
    dv = data_viewer()

    fid_file = {'data': 'ise36.dat', 'gain': 80, 'pc': 90, 'P': 0}
    show_fids([fid_file], data2014_dir, dv,
              prefix='2014, ise36.dat: ')
                
    show_fids(mwdep2014_fids, data2014_dir, dv,
              prefix='2014: ')
    show_fids(mwdep2013_fids, data2013_dir, dv,
              prefix='2013: ')
    show_fts(mwdep2014_fids, data2014_dir, dv,
             pc=True, prefix='2014: ')
    show_fts(mwdep2013_fids, data2013_dir, dv,
             pc=True, prefix='2013: ')
    
    mwdep2014 = compute_mwdep(mwdep2014_fids, data2014_dir,