def run_parallel(logZ): uvb = 'KS18' uvb_Q = 18 # for vikram cloudy_path = '/home/vikram/c17.02' fname = (logZ + 4) * 100 input_File = '/mnt/quasar2/vikram/cloudy_run/shubham/try_{}_Q{}_Z{:.0f}.in'.format( uvb, uvb_Q, fname) print(uvb, 'Q=', uvb_Q, 'Z=', logZ) # write input file and run cloudy ions, params = cloudy_params_defaults(uvb=uvb, uvb_Q=uvb_Q, z=0.39047, log_hden=[-6, -2, 0.02], stop_NHI=18.85, T=None, metal=logZ, sequential=True) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) return
def run_parallel(uvb_Q, uvb, logT): # for vikram cloudy_path = '/home/vikram/c17.02' fname = logT * 100 input_File = '/home/vikram/cloudy_run/hybrid_NH19/try_{}_Q{}_logT{:.0f}.in'.format( uvb, uvb_Q, fname) print(uvb, 'Q=', uvb_Q, 'T=', logT) # write input file and run cloudy ions, params = cloudy_params_defaults(uvb=uvb, uvb_Q=uvb_Q, log_hden=[-6, -2, 0.02], stop_NHI=19, T=10**logT, sequential=True) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) return
def run_parallel(logTemp, uvb_Q = 18): # for vikram cloudy_path = '/home/vikram/c17.02' input_File = '/home/vikram/cloudy_run/temperature_NH15/try_Q{}_T{:.0f}.in'.format(uvb_Q, logTemp*100) # write input file and run cloudy ions, params = cloudy_params_defaults(uvb_Q=uvb_Q, log_hden=[-6, -2, 0.01], stop_NHI = 15, T = 10**logTemp, sequential = True) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) return
def run_parallel(logZ, uvb_Q, uvb): # for vikram cloudy_path = '/home/vikram/c17.02' fname = (logZ+4)*100 input_File = '/home/vikram/cloudy_run/metal_NH15/try_{}_Q{}_Z{:.0f}.in'.format(uvb, uvb_Q, fname) print(uvb, 'Q=', uvb_Q, 'Z=', logZ) # write input file and run cloudy ions, params = cloudy_params_defaults(uvb = uvb, uvb_Q=uvb_Q, log_hden=[-4.5, -3, 0.5], stop_NHI = 15, T = None, metal = logZ, sequential = True) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) return
def run_parallel(uvb_Q): # for vikram cloudy_path = '/home/vikram/c17.02' input_File = '/home/vikram/cloudy_run/anshuman_NH16/try_Q{}.in'.format( uvb_Q) # write input file and run cloudy ions, params = cloudy_params_defaults(uvb_Q=uvb_Q, log_hden=[-6, -2, 0.01], stop_NHI=16) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) return
from cgm_uvb.cloudy_run import run from cgm_uvb.cloudy_run import store_table from cgm_uvb.cloudy_run import cloudy_params_defaults import multiprocessing as mp if 1: cloudy_path = '/home/vikram/c17.02' input_File = '/home/vikram/cloudy_run/scratch/try_fg20.in' # write input file and run cloudy ions, params = cloudy_params_defaults(uvb='FG20', hden_vary=False, stop_NHI=14) write_input(input_File, *ions, **params) run(cloudy_path=cloudy_path, input_file=input_File) # write output tables output_filename = input_File.split('.in')[0] + '.spC' fits_filename = input_File.split('.in')[0] + '.fits' store_table(ions=ions, output_file=output_filename, fits_filename=fits_filename) """ uvb_Q=19 cloudy_path = '/home/vikram/c17.02' input_File = '/home/vikram/cloudy_run/try.in' # write input file and run cloudy ions, params = cloudy_params_defaults(uvb_Q=uvb_Q, log_hden= [-5, -3, 1]) write_input(input_File, *ions, **params)