def region_indeces(wave_min, wave_max, wavenlength_range): low_trim, up_trim = searchsorted(wavenlength_range, [wave_min, wave_max]) indeces_array = array(range(low_trim, up_trim)) return indeces_array dz = Dazer() script_code = dz.get_script_code() lickIndcs_extension = "_lick_indeces.txt" # Load catalogue dataframe catalogue_dict = dz.import_catalogue() catalogue_df = dz.load_dataframe(catalogue_dict["dataframe"]) SIII_theo = 2.469 H7_H8_ratio_theo = 1.98 # Set figure format size_dict = {"figure.figsize": (16, 10), "axes.labelsize": 16, "legend.fontsize": 20} dz.FigConf(plotStyle="seaborn-colorblind", plotSize=size_dict, Figtype="Grid_size", n_columns=1, n_rows=2) # Sulfur lines to plot lines_interest = ["S3_9069A", "S3_9531A", "H1_9015A", "H1_9229A", "H1_9546A"] for i in range(len(catalogue_df.index)): print "\n-- Treating {} @ {}".format(catalogue_df.iloc[i].name, catalogue_df.iloc[i].Red_file)
from dazer_methods import Dazer #Create class object dz = Dazer() script_code = dz.get_script_code() #Define operation catalogue_dict = dz.import_catalogue() #Load catalogue dataframe catalogue_df = dz.load_dataframe(catalogue_dict['dataframe']) #Set figure format dz.FigConf() #Loop through the objects for i in range(len(catalogue_df.index)): #Treat each arm file for color in ['Blue', 'Red']: if (color == 'Red') and (catalogue_df.iloc[i].tell_correction != 'None'): fits_file = catalogue_df.iloc[i].tellRed_file else: fits_file = catalogue_df.iloc[i]['{}_file'.format(color)] #Read the data redshift = catalogue_df.iloc[i]['z_{}'.format(color)] z_fits_file = fits_file.replace('.fits', '_z.fits')
from matplotlib import pyplot as plt from dazer_methods import Dazer from uncertainties import ufloat from numpy import searchsorted, ceil as np_ceil, interp, random, nanmean, nanstd, median from pylatex import Math, NoEscape, Section from os.path import isfile #Create class object dz = Dazer() #Load catalogue dataframe catalogue_dict = dz.import_catalogue() catalogue_df = dz.load_dataframe(catalogue_dict['dataframe']) #Grid configuration n_columns = 4.0 sizing_dict = { 'xtick.labelsize': 8, 'ytick.labelsize': 10, 'axes.titlesize': 14 } #Declare data for the analisis AbundancesFileExtension = '_' + catalogue_dict[ 'Datatype'] + '_linesLog_reduc.txt' cHbeta_type = 'cHbeta_reduc' #Atoms for the abundances MC_length = 500 dz.load_elements() oxygen_emision = ['O2_3726A', 'O3_4363A', 'O3_4959A', 'O3_5007A', 'O2_7330A']