Exemple #1
0
    def __init__(self, Conf_Folder, LinesLogHeader_Name):

        #Import the library with the fitting algorithms with gaussians
        Fitting_Gaussians.__init__(self)
        LineMesurer_Log.__init__(self, Conf_Folder, LinesLogHeader_Name)
        
        #Line definition
        self.Current_Label          = None
        self.Current_Ion            = None
        self.Current_TheoLoc        = None

        #Textfile where we store our data
        self.Current_LinesLog       = None
                              
        #Vector we use to store the 6 wavelengths which define the emision line location and the two continuums
        self.Selections             = []
        
        #Indexes for the "Selections vector" wavelengths              
        self.ind1                   = None      #Wave1
        self.ind2                   = None      #Wave2
        self.ind3                   = None      #Wave3
        self.ind4                   = None      #Wave4
        self.ind5                   = None      #Wave5
        self.ind6                   = None      #Wave6
        
        #New design
        self.BoxSize                = 70
        
        #Dictionary to store the data
        self.Parameter_dict = OrderedDict.fromkeys(self.ColumnHeaderVector)
        
        #Extra mechanisms for testing the wide component on Halpha      
        self.force_WD = True               
Exemple #2
0
    def __init__(self, Conf_Folder, LinesLogHeader_Name):

        #Import the library with the fitting algorithms with gaussians
        Fitting_Gaussians.__init__(self)
        LineMesurer_Log.__init__(self, Conf_Folder, LinesLogHeader_Name)
        
        #Line definition
        self.Current_Label          = None
        self.Current_Ion            = None
        self.Current_TheoLoc        = None

        #Textfile where we store our data
        self.Current_LinesLog       = None
                                      
        #Without a graphical interface we need a dataframe with the possible blended lines
        self.blendedLines_Table()
                
        #New design
        self.BoxSize = 70
        
        #Dictionary to store the data
        self.Parameter_dict = OrderedDict.fromkeys(self.ColumnHeaderVector)
        
        #Extra mechanisms for testing the wide component on Halpha      
        self.force_WD = True         
        
        #Parameters to save in log #WARNING: Missing emission line type
        self.saving_parameters_list = ['Ion',
                                  'lambda_theo',
                                  'lambda_obs',
                                  'flux_intg',
                                  'flux_intg_er',
                                  'flux_gauss', 
                                  'flux_gauss_er', 
                                  'eqw',
                                  'eqw_er',
                                  'A',
                                  'A_er',
                                  'mu',
                                  'mu_er',
                                  'sigma',
                                  'sigma_er',
                                  'zerolev_mean', #continuum linear value at line region center
                                  'zerolev_std',
                                  'zerolev_width',                                  
                                  'm_zerolev',
                                  'n_zerolev',                                  
                                  'Wave1',
                                  'Wave2',
                                  'Wave3',
                                  'Wave4',
                                  'Wave5',
                                  'Wave6',
                                  'blended_check',
                                  'line_number',
                                  'group_label',
                                  'add_wide_component',
                                  'fit_routine']
Exemple #3
0
    def __init__(self, Conf_Folder, LinesLogHeader_Name):

        #Import the library with the fitting algorithms with gaussians
        Fitting_Gaussians.__init__(self)
        LineMesurer_Log.__init__(self, Conf_Folder, LinesLogHeader_Name)
        
        #Line definition
        self.Current_Label          = None
        self.Current_Ion            = None
        self.Current_TheoLoc        = None

        #Textfile where we store our data
        self.Current_LinesLog        = None

        #Estimated parameters for  Gaussian [A, mu, sigma]
        self.p_0                    = None
        
        #Predicted parameters for  Gaussian [A, mu, sigma]
        self.p_1                    = None
        
        #Standard deviations for parameters for Gaussian std[A, mu, sigma] only in MCMC methods
        self.p_1_stdev              = None
        
        #Mean value and deviation for the Gaussian from MCMC
        self.p_1_Area_Norm          = None
        
        #Line equivalent width
        self.EqW                    = None
        
        #Line parameters from direct integration and classic error
        self.Flux_Brute             = None
        self.SigmaF                 = None
        self.SigmaEW                = None
        
        #Line parameters from gaussian fitting
        self.Flux_Gauss             = None
        self.SigmaF_MCMC            = None
        self.SigmaEW_MCMC           = None
        
        #Continuum dispersion
        self.SigmaContinuum         = None
        
        #Fitted continuum properties
        self.Continuum_Gradient     = None      #Assuming a line this is the gradient (m)
        self.Continuum_n            = None      #Assuming a line this is the y axis interception point (n)
        self.ContinuumWidth         = None      #Number of pixels used in the continuum fitting in both the blue and red regions
        self.LocalMedian            = None      #Fitted continuum value at the peaks wavelength
        self.ContinuumFlux          = None      #Vector with the fitted continuum values in the line region   
      
        #Boolean parameters
        self.EmissionType           = None      #True Emission line, False absorption
        
        
        #Deblending
        self.List_BlendedLines      = self.BlendedLines_Table()
        self.ProceedToDeblend        = False
        self.Num                    = None      #1 if current line is in the location we are currently measuring
        
        self.Current_BlendedGroup   = None      #The group of blended lines we are considering
        self.Deblend_Check          = None     #Blended: Line cannot be divided into components. Deblended: Line has been divided into components
        self.Lower_Wav_Measured     = False     #Check for making sure we are only going to measure a line blended if it has the lowest wavelength
        self.Current_Blended_Label  = None
                
        #Vector we use to store the 6 wavelengths which define the emision line location and the two continuums
        self.Selections             = []
        
        #Indexes for the "Selections vector" wavelengths              
        self.ind1                   = None  #Wave1
        self.ind2                   = None  #Wave2
        self.ind3                   = None  #Wave3
        self.ind4                   = None  #Wave4
        self.ind5                   = None  #Wave5
        self.ind6                   = None  #Wave6
        
        #New design
        self.BoxSize                = 70