#             Treatment for the line ratios
            if thekey in ["O3_ratio", "N2_ratio", "S3_ratio"]:
                value = format_for_table(Ratios_dict[thekey])
                color = RatiosColor_dict[thekey]
                Object_row[j] = r"\textcolor{" + color + "}{" + value + "}"

            # Treatment for the physical conditions
            if thekey in ["TOIII", "TOII", "TSIII", "TSII", "nSII", "cHBeta"]:
                value = pv.GetParameter_ObjLog(CodeName, FileFolder, thekey, "string", sigfig=5, strformat="{:.2f}")
                Object_row[j] = value

            # Treatment for metallic abundances
            elif thekey in ["OI_HI", "NI_HI", "SI_HI", "SI_HI_ArCorr"]:
                value = pv.GetParameter_ObjLog(CodeName, FileFolder, thekey, "float")
                if value != None:
                    abund_log = 12 + umath_log10(value)
                    formated_abundance = format_for_table(abund_log)
                else:
                    formated_abundance = None
                Object_row[j] = formated_abundance

            # Treatment for Helium abundances

            elif thekey in [
                "HeI_HI",
                "HeII_HII",
                "HeIII_HII",
                "Y_Mass_O",
                "Y_Inference_O",
                "Y_Mass_S",
                "Y_Inference_S",
Ejemplo n.º 2
0
    entry_name = '{}'.format(bayes_catalogue_df.loc[objName].quick_index)

    if entry_name not in [
            'SHOC588', 'SHOC592', 'SHOC036', 'SHOC575', 'SHOC579', 'SHOC220'
    ]:

        objData = bayes_catalogue_df.loc[objName]
        row = [entry_name]

        for param in properties_list:
            param_value = objData[param]
            param_err = objData[param + '_err']
            param_un = un.ufloat(param_value, param_err)

            if param not in ['HeI_HI', 'Ymass_O', 'Ymass_S']:
                param_un = 12 + umath_log10(param_un)

            if np.isnan(param_un.nominal_value):
                param_un = np.nan

            row.append(param_un)

    dz.addTableRow(
        row,
        last_row=False if bayes_catalogue_df.index[-1] != objName else True,
        rounddig=3,
        rounddig_er=1)

    # regressions_employed = []
    # for element in ['O', 'N', 'S']:
    #     validity_entry = catalogue_df.loc[objName, element + '_valid']
Ejemplo n.º 3
0
#             Treatment for the line ratios
            if thekey in ['O3_ratio', 'N2_ratio', 'S3_ratio']:
                value = format_for_table(Ratios_dict[thekey])
                color = RatiosColor_dict[thekey]
                Object_row[j] = r'\textcolor{' + color + '}{' + value + '}'
             
            #Treatment for the physical conditions
            if thekey in ['TOIII', 'TOII', 'TSIII', 'TSII', 'nSII', 'cHBeta']:
                value           = pv.GetParameter_ObjLog(CodeName, FileFolder, thekey, 'string', sigfig=5, strformat= '{:.2f}')
                Object_row[j]   = value
 
            #Treatment for metallic abundances
            elif thekey in ['OI_HI', 'NI_HI', 'SI_HI', 'SI_HI_ArCorr']:
                value               = pv.GetParameter_ObjLog(CodeName, FileFolder, thekey, 'float')
                if value != None:
                    abund_log           = 12 + umath_log10(value)
                    formated_abundance = format_for_table(abund_log)
                else:
                    formated_abundance = None
                Object_row[j] = formated_abundance
  
            #Treatment for Helium abundances
            
            elif thekey in ['HeI_HI', 'HeII_HII', 'HeIII_HII', 'Y_Mass_O', 'Y_Inference_O', 'Y_Mass_S', 'Y_Inference_S']:
                value = pv.GetParameter_ObjLog(CodeName, FileFolder, thekey, 'float')
                if value != None:
                    formated_abundance = format_for_table(value, 3)
                else:
                    formated_abundance = None
                Object_row[j] = formated_abundance
        SI_HI_un = SII_HII_un + SIII_HII_un

        save_unVariables(catalogueDf, objName, 'SI_HI', SI_HI_un.nominal_value,
                         SI_HI_un.std_dev)

    # Add S+3 contribution from Argon lines
    if np.isnan(catalogueDf.loc[
            objName,
        ['SI_HI', 'ArIII_HII', 'ArIV_HII']].values).any() == False:

        SI_HI_un, SII_HII_un, SIII_HII_un = load_unVariables(
            catalogueDf, objName, ['SI_HI', 'SII_HII', 'SIII_HII'])
        ArIII_HII_un, ArIV_HII_un = load_unVariables(catalogueDf, objName,
                                                     ['ArIII_HII', 'ArIV_HII'])

        logAr2Ar3 = umath_log10(ArIII_HII_un) / umath_log10(ArIV_HII_un)
        logSIV = umath_log10(
            SIII_HII_un) - (logAr2Ar3 - n_SIV_correction) / m_SIV_correction
        SIV_HII_un = umath_pow(10, logSIV)

        SI_HI_un += SIV_HII_un
        ICF_SIV = SI_HI_un / (SII_HII_un + SIII_HII_un)

        save_unVariables(catalogueDf, objName, 'SI_HI', SI_HI_un.nominal_value,
                         SI_HI_un.std_dev)
        save_unVariables(catalogueDf, objName, 'SIV_HII',
                         SIV_HII_un.nominal_value, SIV_HII_un.std_dev)
        save_unVariables(catalogueDf, objName, 'ICF_SIV',
                         ICF_SIV.nominal_value, ICF_SIV.std_dev)

    # Compute nitrogen abundance