<commit_before>import plasma
import initialize

def run_oned(conn, fname):
    initial_config = initialize.read_simple_config(fname)
    return initial_config<commit_msg>first simple framework of temperature iteration<commit_after>import plasma
import initialize

def run_oned(conn, fname):
    initial_config = initialize.read_simple_config(fname)
    return initial_config
    
    t_rad = initial_config['t_inner']
    w = 1.
    energy_of_packet = 1 / initial_config['packets']
    
    
    
    while True:
        #myplasma = plasma.LTEPlasma.from_db('simple_run.tconf', conn)
        nus = photon.random_blackbody_nu(T, nu_range=(1e8*constants.c / 2000, 1e8*constants.c/ 9000), size=no_of_packets)
        mus = np.sqrt(np.random.random(no_of_packets))
        
        #WRITE!!
        tau_sobolev = myplasma.calculate_tau_sobolev()
        
        
        #add energy to montecarlo function
        nu, energy, j_estimator, nubar_estimator = c_montecarlo.run_simple_oned(nus, mus, line_list_nu, tau_sobolevs,
                    initial_config['r_inner'], initial_config['r_outer'], initial_config['v_inner'], myplasma.electron_density, energy_of_packet)
        
        new_trad = constants.trad_estimator_constant * nubar_estimator / j_estimator
        new_w = constants.w_estimator_constant * j_estimator / new_trad**4 / (inital_config['time_simulation'] * (4/3) * np.pi * (r_outer**3 - r_inner**3))
        print "trad / new_trad = %.2f/%.2f w / new_w =  %.2f/%.2f" % (trad, new_trad, w, new_w)
        w = (new_w + w)*.5
        trad = (new_trad + trad)*.5
        
{'fraction_non_alphanumeric': 0.10858585858585859, 'fraction_numerical': 0.015782828282828284, 'mean_word_length': 3.149214659685864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5368678', 'n_tokens_mistral': 577, 'n_tokens_neox': 562, 'n_words': 98}