コード例 #1
0
ファイル: make_plots.py プロジェクト: florisvb/OdorAnalysis
def main(path, config, reprep=False):

    if reprep:
        culled_dataset = prep_dataset.main(path, config)
        dataset = culled_dataset
    else:
        culled_dataset_filename = os.path.join(path, config.culled_datasets_path, config.culled_dataset_name) 
        culled_dataset = fad.load(culled_dataset_filename)
        dataset = culled_dataset
    
    if 0:
        raw_dataset_name = os.path.join(path, config.raw_datasets_path, config.raw_dataset_name)
        raw_dataset = fad.load(raw_dataset_name)
        prep_dataset.prep_data(raw_dataset, path, config)
        dataset = raw_dataset    
    
    
    figure_path = os.path.join(path, config.figure_path)
    
    plot_heatmaps.pdf_book(config, dataset, save_figure_path=os.path.join(figure_path, 'heatmaps/') )
    #plot_spagetti.main(config, dataset, save_figure_path=os.path.join(figure_path, 'spagetti/') )
    #plot_activity_histograms.main(dataset, save_figure_path=os.path.join(figure_path, 'activity/') )
    #plot_distance_histograms.plot_distance_histogram(config, dataset, save_figure_path='')
    plot_landing_histogram.plot_landing_histogram(config, dataset)
    sachead.main(config, dataset)
コード例 #2
0
def main(path, config):

    if 0:
        culled_dataset = prep_dataset.main(path, config)
        dataset = culled_dataset
        
    if 1:
        raw_dataset_name = os.path.join(path, config.raw_datasets_path, config.raw_dataset_name)
        raw_dataset = fad.load(raw_dataset_name)
        prep_dataset.prep_data(raw_dataset, path, config)
        dataset = raw_dataset    
    
    
    figure_path = os.path.join(path, config.figure_path)
    
    plot_heatmaps.main(dataset, save_figure_path=os.path.join(figure_path, 'heatmaps/') )
    plot_spagetti.main(dataset, save_figure_path=os.path.join(figure_path, 'spagetti/') )
    plot_activity_histograms.main(dataset, save_figure_path=os.path.join(figure_path, 'activity/') )
コード例 #3
0
    ax.set_xticklabels(xticklabels)
    ax.set_ylabel('occurences, normalized')

    path = config.path
    figure_path = os.path.join(config.path, config.figure_path)
    save_figure_path=os.path.join(figure_path, 'odor_traces/')
        
    figure_path = os.path.join(path, config.figure_path)
    save_figure_path = os.path.join(figure_path, 'odor_traces/')
    fig_name_with_path = os.path.join(save_figure_path, savename)

    print 'SAVING TO: ', fig_name_with_path
    fig.savefig(fig_name_with_path, format='pdf')
    
if __name__ == '__main__':
    parser = OptionParser()
    parser.add_option("--path", type="str", dest="path", default='',
                        help="path to data folder, where you have a configuration file")
    (options, args) = parser.parse_args()
    
    path = options.path    
    analysis_configuration = imp.load_source('analysis_configuration', os.path.join(path, 'analysis_configuration.py'))
    config = analysis_configuration.Config(path)
    culled_dataset_filename = os.path.join(path, config.culled_datasets_path, config.culled_dataset_name) 
    dataset = fad.load(culled_dataset_filename)
    
    
    plot_orientation_airheading_groundheading(dataset, config, visual_stimulus='none')