from pandas                     import set_option
from DZ_observation_reduction   import spectra_reduction
from os                         import path
from dazer_methods import Dazer

set_option('display.max_columns', None)
set_option('display.max_rows', None)
 
#Load iraf pypeline object
dzt = Dazer()
dz = spectra_reduction()
 
#Load reduction data frame
dz.declare_catalogue(dz.Catalogue_folder)
 
print '\nCATALOGUE OBJECT'
print dz.reducDf.OBJECT.unique()
print '\nCATALOGUE OBSTYPE'
print dz.reducDf.OBSTYPE.unique()
 
#Declare the empty column
Catalogue_objects   = dz.observation_dict['objects']
Catalogue_stdstars  = dz.observation_dict['Standard_stars']
 
emergency_case = False

print '\nScientific objects'
print dz.observation_dict['objects']
print '\nStandard stars'
print dz.observation_dict['Standard_stars']
from pandas import read_csv
from dazer_methods import Dazer
from timeit import default_timer as timer
from DZ_LineMesurer import LineMesurer_v2

#Define main class
dz = Dazer()
lm = LineMesurer_v2('/home/vital/workspace/dazer/format/',
                    'DZT_LineLog_Headers.dz')

#Making the plot:
dz.FigConf()

#Load catalogue dataframe
catalogue_dict = dz.import_catalogue()
catalogue_df = dz.load_excel_DF(
    '/home/vital/Dropbox/Astrophysics/Data/WHT_observations/WHT_Galaxies_properties.xlsx'
)
lickIndcs_extension = '_lick_indeces.txt'

#Declare object to treat
objName = 'SHOC575_n2'

#Load line regions
ouput_folder = '{}{}/'.format(catalogue_dict['Obj_Folder'], objName)
lick_idcs_df = read_csv(ouput_folder + objName + lickIndcs_extension,
                        delim_whitespace=True,
                        header=0,
                        index_col=0,
                        comment='L')  #Dirty trick to avoid the Line_label row
Пример #3
0
from dazer_methods import Dazer
from lib.ssp_functions.ssp_synthesis_tools import ssp_fitter
from timeit import default_timer as timer

dzp = Dazer()
dz = ssp_fitter()

#Data folder location
data_folder = '/home/vital/workspace/Fit_3D/example_files/'
defaut_conf = 'auto_ssp_V500_several_Hb.config'

#Read parameters from command line
command_dict = dz.load_command_params(data_folder)

#Read parameters from config file
conf_file_address = command_dict[
    'config_file_address'] if 'config_file_address' in command_dict else data_folder + defaut_conf
config_dict = dz.load_config_params(conf_file_address)

#Update the fit configuration giving preference to the values from the command line
config_dict.update(command_dict)

#Import input data: spectrum, masks, emision line loc, stellar bases...
dz.load_input_data(config_dict)

#Perform SSP synthesis
start = timer()
fit_products = dz.fit_ssp(config_dict['input_z'], config_dict['input_sigma'],
                          config_dict['input_Av'])
end = timer()
print 'ssp', ' time ', (end - start)