Пример #1
0
from Scientific_Lib.IrafMethods import Pyraf_Workflow
from CodeTools.File_Managing_Tools import File_Manager

# 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])