R_SII = '{:f}'.format(ufloat(nanmean(dz.abunData.R_SII), nanstd(dz.abunData.R_SII))) if 'R_SII' in dz.abunData.index else 'Not measured' cHbeta = '{:f}'.format(cHbeta) print '{:10s} {:15s} {:15s} {:15s} {:15s} {:15s}'.format(objName, R_SII, cHbeta, neSII, TSIII, TOIII) print 'Argon abundance' dz.argon_abundance_scheme() print 'Sulfur abundance' dz.sulfur_abundance_scheme() print 'Oxygen abundance' dz.oxygen_abundance_scheme() print 'Nitrogen abundance' dz.nitrogen_abundance_scheme() print 'Helium abundance' dz.helium_abundance_scheme_Oxygen(lineslog_frame) dz.helium_abundance_scheme_Sulfur(lineslog_frame) #Store the abundances frame_address = catalogue_dict['Obj_Folder'].replace('objects/', 'catalogue_df') dz.store_abundances(objName, catalogue_df, frame_address) print '\nAll data treated\n', dz.display_errors() # from dazer_methods import Dazer # from numpy import isnan #
T_high = dz.abunData[ Thigh_key] if Thigh_key in dz.abunData else dz.generate_nan_array( ) #Argon dz.argon_abundance_scheme(T_low, T_high, ne) #Sulfur dz.sulfur_abundance_scheme( T_low, ne, SIII_lines_to_use=catalogue_df.loc[objName].SIII_lines) #Oxygen dz.oxygen_abundance_scheme(T_low, T_high, ne) #Nitrogen dz.nitrogen_abundance_scheme(T_low, ne) print '-Helium abundances' if 'neSII' in dz.abunData: dz.helium_abundance_elementalScheme(T_high, ne, lineslog_frame, metal_ext='O') dz.helium_abundance_elementalScheme(T_high, ne, lineslog_frame, metal_ext='S') #Store the abundances dz.store_abundances_excel(objName,
lines_dict=dz.lines_dict, error=0.05) dz.abunData, Data_TestObject = Series(), Series() Data_TestObject['SIII_lines'] = 'BOTH' dz.determine_electron_parameters(Data_TestObject) dz.argon_abundance_scheme(dz.abunData['TeOIII'], dz.abunData['TeSIII'], dz.abunData['neSII']) dz.sulfur_abundance_scheme(dz.abunData['TeSIII'], dz.abunData['neSII'], SIII_lines_to_use=Data_TestObject.SIII_lines) dz.oxygen_abundance_scheme(dz.abunData['TeOIII'], dz.abunData['TeSIII'], dz.abunData['neSII']) dz.nitrogen_abundance_scheme(dz.abunData['TeOIII'], dz.abunData['neSII']) for parameter in dz.abunData.index: mean_value, std_value = mean(dz.abunData[parameter]), std( dz.abunData[parameter]) scientfici_not = True if (mean_value < 1e-4) or ( mean_value > 1e-5) else False print '--', parameter, '\t\t', round_sig( mean_value, 5, scientfici_not), ' +/- ', round_sig(std_value, 5, scientfici_not) # dz = Dazer() # dz.load_elements() # # param_dict = {} # param_dict['ne_true'] = 150.0