newpoint.Print() Data=DataFile(Dir='mcmc') record_number=-1 try_point=0 last_chisq=1e10 # scan ================================================================== while record_number < target_number: try_point+=1 if try_point%1000==1: print('Trying point %i; %i points recorded; current X2 is %.3e'%(try_point,record_number,last_chisq)) if try_point>1e10:break try: spectr=N.Run(newpoint,ignore=ignore) except FileNotFoundError: newpoint=copy.deepcopy(free).Sample(step_factor=step_factor) continue if spectr.ERROR: newpoint=copy.deepcopy(free).Sample(step_factor=step_factor) # print(spectr.SPINFO) continue chisq_list={} # X2 chisq_list['constraints']=len(spectr.constraints)*1e4 chi_h1=chi2(spectr.MASS[25],mh) chi_h2=chi2(spectr.MASS[35],mh) if 'h1' in ism.lower():
print(number_str) mold.GetValue(sample.documents['inp'], mapping={'auxiliary': 'EXTPAR'}) del (mold.variable_list['Kappa'].value) mold.variable_list['minusK'].value = -mold.variable_list['minusK'].value diff_points = {} # point in the central diff_points['central'] = ReadNMSSMToolsSpectr(sample.documents['spectr']) for par in par_name_list: # right limit plus = copy.deepcopy(mold) plus.free_parameter_list[ par].value += plus.free_parameter_list[par].value / 10000 spectr_plus = N.Run(plus) destinations = { 'inp': os.path.join(N.record_dir, 'inp.dat.' + number_str + '.' + par + '_plus'), 'spectr': os.path.join(N.record_dir, 'spectr.dat.' + number_str + '.' + par + '_plus'), 'omega': os.path.join(N.record_dir, 'omega.dat.' + number_str + '.' + par + '_plus') } shutil.copy(N.inp_dir, destinations['inp']) shutil.copy(N.output_dir, destinations['spectr']) shutil.copy(N.output_omega_dir, destinations['omega']) diff_points[par + '+'] = spectr_plus