# pv.Current_Label = 'O3_5007A' # pv.Current_Ion = '[OIII]' # pv.Current_TheoLoc = 5006.843 # pv.Current_Label = 'O2_7319A' # pv.Current_Ion = '[OII]' # pv.Current_TheoLoc = 7319.000 # # pv.Current_Label = 'O2_7330A' # pv.Current_Ion = '[OII]' # pv.Current_TheoLoc = 7330.000 pv.Fitting_dict['Wide component'] = False pv.save_to_file_check = False pv.Current_LinesLog = '/home/vital/Dropbox/Astrophysics/Data/WHT_Catalogue_SulfurRegression/Objects/SHOC579/' + CodeName + '_WHT_LinesLog_v3.txt' pv.Selections = pv.RangesR(Selections, pv.Current_TheoLoc, pv.Current_LinesLog) print 'The selections', pv.Selections pv.Selections = [6497.6857399999999, 6524.8928889999997, 6541.0, 6593.0, 6593.1912490000004, 6616.0508639999998] pv.PlottingInLineMeasuring(store_data = False) print pv.Fitting_dict['blended number'] for i in range(pv.Fitting_dict['blended number']): index = str(i) print index, pv.Fitting_dict['A' + index].nominal_value print index, pv.Fitting_dict['mu' + index].nominal_value print index, pv.Fitting_dict['sigma' + index].nominal_value sigma_limits = 4 sigma_small_limit = 2.5
pv.LogTableAddress = FileFolder + LogTableName #Generate data log if emision lines log (THIS COULD BE AN ISOLATED METHOD) pv.CleanTableMaker(pv.LogTableAddress, pv.RemakeFiles) #Defining lines log pv.Current_LinesLog = FileFolder + LogTableName # Start to loop through recorded line for m in range(1, len(TextLines)): try: Line = TextLines[m].split() pv.Current_Label, pv.Current_Ion, pv.Current_TheoLoc = Line[0], Line[1], float(Line[2]), pv.Wave1, pv.Wave2, pv.Wave3, pv.Wave4, pv.Wave5, pv.Wave6 = float(Line[4]), float(Line[5]), float(Line[6]), float(Line[7]), float(Line[8]), float(Line[9]) pv.Selections = [pv.Wave1, pv.Wave2, pv.Wave3, pv.Wave4, pv.Wave5, pv.Wave6] Ind_min = np_searchsorted(Wave, pv.Wave1) Ind_max = np_searchsorted(Wave, pv.Wave6) SubWave = Wave[Ind_min - 1 : Ind_max + 1] SubInt = Int[Ind_min - 1 : Ind_max + 1] pv.ind1, pv.ind2, pv.ind3, pv.ind4, pv.ind5, pv.ind6 = np_searchsorted(SubWave, pv.Wave1), np_searchsorted(SubWave, pv.Wave2), np_searchsorted(SubWave, pv.Wave3), np_searchsorted(SubWave, pv.Wave4), np_searchsorted(SubWave, pv.Wave5), np_searchsorted(SubWave, pv.Wave6) print '---Emission', pv.Current_Label #Clear the dictionaries with the line data pv.Fitting_dict = pv.Fitting_dict.fromkeys(pv.Fitting_dict) pv.Parameter_dict = pv.Parameter_dict.fromkeys(pv.Parameter_dict) #Calculation and plotting of continuum properties pv.LocalMedian, pv.ContinuumFlux, pv.SigmaContinuum, pv.Continuum_Gradient, pv.Continuum_n, WPoint1, Wpoint2, FPoint1, FPoint2 = pv.ContinuumRegions(SubInt, SubWave)
#---------------------------Complete Mode-------------------------------------------------------------------- pv.RemakeFiles = False pv.Wave = Wave pv.Int = Int pv.Current_Code = CodeName Selections = [] Line_Label = 'N2_6548A' pv.Current_LinesLog = '/home/vital/Dropbox/Astrophysics/Data/WHT_Catalogue/Objects/51959-092/' + CodeName + '_WHT_LinesLog_v3.txt' Ion = pv.GetDataInTable('Line_Label',"Ion", Line_Label, pv.Current_LinesLog, pv.TableHeaderSize) TheoWavelength = pv.GetDataInTable('Line_Label',"TheoWavelength", Line_Label, pv.Current_LinesLog, pv.TableHeaderSize, dataype='float') pv.Current_Label, pv.Current_Ion, pv.Current_TheoLoc = Line_Label, Ion, TheoWavelength pv.Selections = pv.RangesR(Selections, pv.Current_TheoLoc, pv.Current_LinesLog) pv.PlottingInLineMeasuring() pv.DisplayFigure() pv = Plots_Manager() # #---------------------------Simple Mode-------------------------------------------------------------------- # #Load data into the class # Line_Label = 'O2_3726A' # Line_Label = 'He1_4472A' # #["Line_Label", "Ion", "TheoWavelength", "Blended_Set","Wave1", "Wave2", "Wave3", "Wave4", "Wave5", "Wave6"] # pv.Current_Label, pv.Current_Ion = Line_Label, 'NoImporta'