pv.FigFormat_One(ColorConf='Night1')

#Identify file
CodeName, FileName, FileFolder = pv.Analyze_Address(FilesList[0])

#Load fits file data
Wave, Int, ExtraData = pv.File2Data(FileFolder, FileName)

#---------------------------Complete Mode--------------------------------------------------------------------
pv.RemakeFiles          = False
pv.Wave                 = Wave
pv.Int                  = Int
pv.Current_Code         = CodeName
Selections              = []
 
pv.Current_Label                    = 'N2_6548A'
pv.Current_Ion                      = 'N2'
pv.Current_TheoLoc                  = 6548.05
# pv.Current_LinesLog                 = '/home/vital/Dropbox/Astrophysics/Data/WHT_Catalogue/Objects/SHOC579/' +  CodeName + '_WHT_LinesLog_v3.txt'
# pv.Fitting_dict['Wide component']   = True
# pv.save_to_file_check               = False

# pv.Current_Label                    = 'N2_6548A'
# pv.Current_Ion                      = 'N2'
# pv.Current_TheoLoc                  = 4861.050
# pv.Current_Label                    = 'H1_4861A'
# pv.Current_Ion                      = 'Halpha_3_2'
# pv.Current_TheoLoc                  = 4862.683
# pv.Current_Label                    = 'He1_5016A'
# pv.Current_Ion                      = 'He1'
# pv.Current_TheoLoc                  = 5016.0
#       Several lines logs depending on the pypeline state: Untreated, Reddening, Nebular continuum, Stellar continuum 
        LogTableName                    = CodeName + DataLog_Extension
        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     
Exemple #3
0
#---------------------------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"]