Exemple #1
0
    def __init__(self):
                
        #----Load libraries:
        
        #For treating files
        File_Manager.__init__(self)
        
        #For generating graphs
        Plot_Conf.__init__(self)
                
        #Scientific operations
        Fitter.__init__(self)

        #Astro_libraries
        ReddeningLaws.__init__(self)
        Chemical_Analysis_pyneb.__init__(self)
        #spectra_reduction.__init__(self) #WARNING: I need a new place to put this
        
        #Load user configuration
        ImportConfiguration.__init__(self)
        LineMesurer.__init__(self, self.Conf_Folder, self.LinesLogHeader_Name)        
        
        #Extra functions
        vitools.__init__(self)
        Error_manager.__init__(self)
Exemple #2
0
    def __init__(self):
        
        #This will load the attributes from "LoadPickle" and "myPickle" and "LineMesurer"
        ImportConfiguration.__init__(self)
        LoadPickle.__init__(self)
        LineMesurer.__init__(self, self.Conf_Folder, self.LinesLogHeader_Name)
        
#       Spectra properties        
        self.Wave                       = None
        self.Int                        = None
        self.ExtraData                  = None

#       This is a list with the lines indexes of the emission lines on the plot. If all the lines are on the plot it would have the same length as the Wavelength_Total for example
        self.EM_in_plot                 = []

#       This list contains the number of screens available
        self.ScreenCodes                = ['OBJECTS',  'TREATMENT',   'LINEMESURER']
        
#       This variable details the current screen (its value should be one from those in the self.ScreenCodes variable)
        self.CurrentScreen              = None
        
#       These indexes detail the current screen we should display
        self.Folder_i                   = None
        self.Treatment_i                = None
        self.EmLine_i                   = None
        
        #These are the names of the files which are obtained from the previous indexes and which are feed into the line mesurer
        self.Current_Folder             = None
        self.Current_Treatment          = None
        self.Current_Spec               = None
        self.Current_Code               = None
Exemple #3
0
    def __init__(self):
                
        #----Load lib:
        
        #For treating files
        File_Manager.__init__(self)
        
        #For generating graphs
        Plot_Conf.__init__(self)
                
        #Scientific operations
        Fitter.__init__(self)

        #Astro_libraries
        ReddeningLaws.__init__(self)
        Chemical_Analysis_pyneb.__init__(self)
        #spectra_reduction.__init__(self) #WARNING: I need a new place to put this
        
        #Load user configuration
        ImportConfiguration.__init__(self)
        LineMesurer.__init__(self, self.Conf_Folder, self.LinesLogHeader_Name)        
        
        #Extra functions
        vitools.__init__(self)
        Error_manager.__init__(self)
Exemple #4
0
    def __init__(self):
        
        #Import the data catalogue and GUI conf
        ImportConfiguration.__init__(self)
        
        #Getting the data
        File_Manager.__init__(self)
        
        #For generating graphs
        Plot_Conf.__init__(self)
        
        #Tools to measure lines
        LineMesurer.__init__(self, self.Conf_Folder, self.LinesLogHeader_Name)
        
        #Spectra properties        
        self.Wave                       = None
        self.Int                        = None
        self.ExtraData                  = None
        self.Selections                 = []

        #This is a list with the lines indexes of the emission lines on the plot.
        self.EM_in_plot                 = []

        #This list contains the number of screens available
        self.ScreenCodes                = ['OBJECTS',  'TREATMENT',  'LINEMESURER']
        
        #This variable details the current screen (its value should be one from those in the self.ScreenCodes variable)
        self.CurrentScreen              = None
        
        #These indexes detail the current screen we should display
        self.Folder_i                   = None
        self.Treatment_i                = None
        self.EmLine_i                   = None
        
        #These are the names of the files which are obtained from the previous indexes and which are feed into the line mesurer
        self.Current_Folder             = None
        self.Current_Treatment          = None
        self.Current_Spec               = None
        self.Current_Code               = None
    
    return Label, float(Wave_1), float(Wave_2), float(Wave_3), float(Wave_4), float(Wave_5), float(Wave_6)

def Determine_Sides_Continuum(SubInt, SubWave, ind1, ind2, ind3, ind4, ind5, ind6):
    Dm.ind1, Dm.ind2, Dm.ind3, Dm.ind4, Dm.ind5, Dm.ind6 = ind1, ind2, ind3, ind4, ind5, ind6
    Dm.LocalMedian, Dm.ContinuumFlux, sigma_Cont, Dm.Continuum_Gradient, Dm.Continuum_n, WPoint1, Wpoint2, FPoint1, FPoint2 = Dm.ContinuumRegions(SubInt, SubWave)

    Flux_BothSides              = concatenate((SubInt[ind1:ind2], SubInt[ind5:ind6]))
    Continuum_BothSides         = concatenate((Dm.ContinuumFlux[ind1:ind2], Dm.ContinuumFlux[ind5:ind6]))
        
    Std_BothSides               = sqrt(mean(square(Flux_BothSides - Continuum_BothSides)))
        
    return Std_BothSides
    
Pv      = plotMan.myPickle()
Dm      = LineMesurer()
GausFit = FitMethods.Fitting_Gaussians()

CatalogueFolder, DataType, Log_Format  = DataToTreat()
# Pattern = 'He2_4686A_line.txt'
# Pattern = 'O2_7319A_line.txt'
# Dm.Current_Label    = 'O2_7319A'
# Dm.Current_Ion      = '[OII]'
# Dm.Current_TheoLoc  = 7319.000


# Pattern             = 'Ne3_3968A_line.txt'
# Dm.Current_Label    = 'Ne3_3968A'
# Dm.Current_Ion      = '[NeIII]'
# Dm.Current_TheoLoc  = 3968