Esempio n. 1
0
Fm                                          = File_Manager()

CatalogueFolder, PropertiesDict             = py_w.DataFormat(Reduction_Operation = 'dopcor')
PatternBlue                                 = PropertiesDict['Suffix_FluxCalibrated_Trimmed']
PatternRed                                  = PropertiesDict['Suffix_FluxCalibrated_Trimmed_Telluric']

#Find and organize files from terminal command or .py file
FilesList_Blue                              = Fm.Folder_Explorer(PatternBlue, CatalogueFolder + 'Blue/', CheckComputer=False)
FilesList_Red                               = Fm.Folder_Explorer(PatternRed, CatalogueFolder + 'Red/', CheckComputer=False)
FilesList                                   = FilesList_Blue + FilesList_Red

#THIS SHOULR GO INSIDE THE CLASS
Catalogue_Instructions                      = CatalogueFolder + py_w.SpectraTreating + Fm.Extensions_dictionary['Reduction Instructions']

Fm.select_Table(Catalogue_Instructions, 1, loadheaders_check = True)
Objects, Redshifts                          = Fm.get_ColumnData(['CodeName', 'Dopcor'], 1, StringIndexes = True, datatype = str, unpack_check = True)

#Generate plot frame and colors
pv.FigFormat_One(ColorConf='Night1')

#Loop through files
for i in range(len(FilesList)):
    #WARNING NOT THE BEST APPROACH... CLEAN:
    if ('obj' in FilesList[i]):
            
        CodeName, FileName, FileFolder                  = pv.FileAnalyzer(FilesList[i])
        
        z                                               = py_w.getTaskConfiguration(CodeName, Objects, Redshifts, ConfAttributes = {'Operation' : 'Redshift correction', 'FileFolder' : FileFolder})
                      
        #Calibration with the global curve
        Object_DopcorCorrected                          = py_w.Dopcortask(FileName, None, FileFolder, z)
Esempio n. 2
0
# Define the library
pv = plotMan.myPickle()
py_w = Pyraf_Workflow("WHT")
Fm = File_Manager()

# Establish the location of files
CatalogueFolder, PropertiesDict = py_w.DataFormat(Reduction_Operation="Obs_TrimCalibrated")
Pattern = PropertiesDict["Suffix_FluxCalibrated"]

# THIS SHOULR GO INSIDE THE CLASS
Catalogue_Instructions = CatalogueFolder + py_w.SpectraTreating + Fm.Extensions_dictionary["Reduction Instructions"]

Fm.select_Table(Catalogue_Instructions, 1, loadheaders_check=True)
Objects, Trimming_wavelengths = Fm.get_ColumnData(
    ["CodeName", "Wavelength_Trim"], 1, StringIndexes=True, datatype=str, unpack_check=True
)

# Find and organize files from terminal command or .py file
FilesList = Fm.Folder_Explorer(Pattern, CatalogueFolder, CheckComputer=False)

# Generate plot frame and colors
pv.FigFormat_One(ColorConf="Night1")

# Loop through files
for i in range(len(FilesList)):

    CodeName, FileName, FileFolder = pv.FileAnalyzer(FilesList[i])

    w_min, w_max = py_w.getTaskConfiguration(
        CodeName,
Esempio n. 3
0
from CodeTools.File_Managing_Tools          import File_Manager

#USE A SMALL ORDER 5?

pv                                          = plotMan.myPickle()
py_w                                        = Pyraf_Workflow('WHT')
Fm                                          = File_Manager()

CatalogueFolder, PropertiesDict             = py_w.DataFormat(Reduction_Operation = 'Std_Clean')
Pattern = '_fxW_t.fits'

#THIS SHOULR GO INSIDE THE CLASS
Catalogue_Instructions                      = CatalogueFolder + py_w.SpectraTreating + Fm.Extensions_dictionary['Reduction Instructions']

Fm.select_Table(Catalogue_Instructions, 1, loadheaders_check = True)
Objects, TelluricStar_List                  = Fm.get_ColumnData(['CodeName', 'Telluric_Star'], 1, StringIndexes = True, datatype = str, unpack_check = True)
        
#Find and organize files from terminal command or .py file
FilesList                                   = Fm.Folder_Explorer(Pattern, CatalogueFolder, CheckComputer = False)

#Generate plot frame and colors
pv.FigFormat_One(ColorConf='Night1')

#Loop through files
for i in range(len(FilesList)):
    #WARNING NOT THE BEST APPROACH... CLEAN:
    print FilesList[i]
    if ('obj' in FilesList[i]) and ('Red' in FilesList[i]):
        print 'hola'
        CodeName, FileName, FileFolder                  = pv.FileAnalyzer(FilesList[i])
        TelluricStar                                    = py_w.getTaskConfiguration(CodeName, Objects, TelluricStar_List, ConfAttributes = {'Operation' : 'Telluric correction'})