#Declare data for the analisis
AbundancesFileExtension = '_' + catalogue_dict['Datatype'] + '_linesLog_emission.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'] 
nitrogen_emision = ['N2_6548A', 'N2_6584A'] 
sulfur_emision = ['S2_6716A', 'S3_6312A', 'S3_9069A', 'S3_9531A'] 

Te = random.normal(10000, 2000, size = MC_length)
ne = random.normal(100, 20, size = MC_length)

dz.create_pdfDoc('/home/vital/Desktop/example_line_abundances')

#Loop through the objects
for i in range(len(catalogue_df.index)):
 
    #Object
    objName         = catalogue_df.iloc[i].name
    
    print 'Treating object: ', objName
        
    #Locate the files
    ouput_folder    = '{}{}/'.format(catalogue_dict['Obj_Folder'], objName) 
    fits_reduc      = catalogue_df.iloc[i].reduction_fits
    fits_emission   = catalogue_df.iloc[i].stellar_fits
    fits_stellar    = ouput_folder + objName + '_StellarContinuum.fits'
    lineslog_address  = '{objfolder}{codeName}{lineslog_extension}'.format(objfolder = ouput_folder, codeName=objName, lineslog_extension=AbundancesFileExtension)
Пример #2
0
                        header=0,
                        delim_whitespace=True)
linformat_df.lambda_theo = round(linformat_df.lambda_theo.values, 2)

for objName in catalogue_df.loc[dz.idx_include].index:

    if objName in ['8', 'SHOC579']:

        local_reference = objName.replace('_', '-')

        quick_reference = catalogue_df.loc[objName].quick_index

        pdf_address = '/home/vital/Dropbox/Astrophysics/Thesis/images/{}_absEffect.png'.format(
            quick_reference)

        dz.create_pdfDoc(pdf_address, pdf_type='table')

        dz.pdf_insert_table(table_format='l' + 'ccc')

        group_dict = OrderedDict()

        # Make dict with all the objects lines dataframes
        ouput_folder = '{}{}/'.format(catalogue_dict['Obj_Folder'], objName)
        linelog_reducAddress = '{objfolder}{codeName}_WHT_linesLog_reduc.txt'.format(
            objfolder=ouput_folder, codeName=objName)
        linelog_emisAddress = '{objfolder}{codeName}_WHT_linesLog_emission_2nd.txt'.format(
            objfolder=ouput_folder, codeName=objName)
        reduc_linedf = dz.load_lineslog_frame(linelog_reducAddress)
        emission_linedf = dz.load_lineslog_frame(linelog_emisAddress)

        Hbeta_F = reduc_linedf.loc['H1_4861A'].line_Flux
Пример #3
0
#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']
nitrogen_emision = ['N2_6548A', 'N2_6584A']
sulfur_emision = ['S2_6716A', 'S3_6312A', 'S3_9069A', 'S3_9531A']

Te = random.normal(10000, 2000, size=MC_length)
ne = random.normal(100, 20, size=MC_length)

dz.create_pdfDoc('/home/vital/Desktop/example_line_abundances')

#Loop through the objects
for i in range(len(catalogue_df.index)):

    #Object
    objName = catalogue_df.iloc[i].name

    print 'Treating object: ', objName

    #Locate the files
    ouput_folder = '{}{}/'.format(catalogue_dict['Obj_Folder'], objName)
    fits_reduc = catalogue_df.iloc[i].reduction_fits
    fits_emission = catalogue_df.iloc[i].stellar_fits
    fits_stellar = ouput_folder + objName + '_StellarContinuum.fits'
    lineslog_address = '{objfolder}{codeName}{lineslog_extension}'.format(