@@ -0,0 +1,2179 @@
+# This script is to be used to launch all the star field jobs for variable_psf and full, so we can%0A# rerun the buggy ones.  Since the scripts have 'noclobber' in them, we can use the old scripts, and%0A# they will just do the star fields that we have removed / stashed.%0A%0Aimport time%0Aimport os%0Aimport subprocess%0Aimport sys%0Aimport shutil%0Aimport mass_produce_utils%0Aimport getpass%0A%0Asys.path.append('..')%0Aimport great3sims%0A%0A# Define some basic parameters.  This includes some system-dependent things like directories for%0A# output.%0Aroot = '/physics/rmandelb/great3-v11'%0An_config_per_branch = 10 # Number of config files to be run per branch.%0Asleep_time = 30 # seconds between checks for programs to be done%0Aqueue_nicely = 14%0A%0A# Set which branches to run.%0Aexperiments = %5B%0A    'variable_psf',%0A    'full',%0A%5D%0A# Put space before ground, because those run faster.%0Aobs_types = %5B%0A    'space',%0A    'ground',%0A%5D%0Ashear_types = %5B%0A    'constant',%0A    'variable',%0A%5D%0A%0Abranches = %5B (experiment, obs_type, shear_type)%0A             for experiment in experiments%0A             for obs_type in obs_types%0A             for shear_type in shear_types%5D%0An_branches = len(branches)%0Aprint %22Producing images for %22,n_branches,%22 branches%22%0A%0Aprefix1 = 'g3_step2_'%0Aall_script_names = %5B%5D%0Afor experiment, obs_type, shear_type in branches:%0A    e = experiment%5B0%5D%0A    o = obs_type%5B0%5D%0A    s = shear_type%5B0%5D%0A%0A    # Set up the per-branch prefix%0A    pbs_name = prefix1+e+o+s%0A    # Now make the script names by looping over the number of configs%0A    for i_config in range(n_config_per_branch):%0A        script_name = pbs_name + '_psf_%2503d'%25i_config + '.sh'%0A        print script_name%0A        all_script_names.append(script_name)%0An_scripts = len(all_script_names)%0Aprint 'Set up names for ',n_scripts,' scripts'%0A%0A# Launch processes%0At1 = time.time()%0Afor script_name in all_script_names:%0A    command_str = 'qsub '+script_name%0A    if queue_nicely:%0A        mass_produce_utils.check_njobs('g3_', sleep_time=sleep_time, n_jobs=queue_nicely)%0A    p = subprocess.Popen(command_str, shell=True, close_fds=True)%0Amass_produce_utils.check_done('g3_', sleep_time=sleep_time)%0At2 = time.time()%0Aprint%0Aprint %22Time for generation of images = %22,t2-t1%0Aprint%0A

set up script to launch all the star field jobs again (#54)