def fit_one_cube(plt, ifu, drpall_file=None, directory_path=None, analysis_path=None): # Grab the required input parameters config_file = '{0}-{1}.cfg'.format(plt, ifu) get_config(plt, ifu, config_file, drpall_file=drpall_file) # Read the datacube cube = MaNGADataCube.from_config(config_file, directory_path=directory_path) # Define how you want to analyze the data plan = AnalysisPlanSet([ AnalysisPlan( drpqa_key='SNRG', bin_key='VOR10', #'HYB10', continuum_key='MILESHCMPL10', elmom_key='EMOMMPL10', elfit_key='EFITMPL10', #'EFITMPL9DB', spindex_key='INDXEN') ]) # Run it! return manga_dap(cube, plan, verbose=2, directory_path=directory_path, analysis_path=analysis_path)
def test_from_config(): cube = MaNGADataCube.from_config(data_test_file('datacube.ini')) assert cube.meta['z'] == 0.0293823, 'Bad config file read' assert cube.meta['ell'] == 0.110844, 'Bad config file read'