<jupyter_start><jupyter_text>This notebook is designed to allow you to tweak how you might like your walkers initialized. Edit the cells as you see fit and then proceed to evaluate each cell and save the final `pos0.npy` file.<jupyter_code>import numpy as np<jupyter_output><empty_output><jupyter_text>Generally, you want at least a few walkers for each dimension you may be exploring. To start with we are only using `4`, but you may want to eventually increase this to `8` or `10` if you have more cores available for computation. For the **vertical** model, there are 13 parameters.<jupyter_code>nparam = 13
nwalkers = 4 * nparam
print(nwalkers)<jupyter_output>52<jupyter_text>If you are allowing distance to float, then you should change the previous line to    nparam = 14and then uncomment out the `dpc` row below. Below, we create an array of starting walker positions, similar to how `emcee` is initialized. You should tweak the `low` and `high` ranges to correspond to a small guess around your starting position.<jupyter_code>p0 = np.array([np.random.uniform(1.03, 1.05, nwalkers), # mass [M_sun]
              np.random.uniform(20., 21.0, nwalkers), #r_c [AU]
              np.random.uniform(30., 40., nwalkers), #T_10m [K]
              np.random.uniform(0.50, 0.55, nwalkers), # q_m 
              np.random.uniform(110., 115, nwalkers), #T_10a [K]
              np.random.uniform(0.50, 0.55, nwalkers), # q_a 
              np.random.uniform(-3.4, -3.1, nwalkers), #log10 Sigma_c [log10 g/cm^2]
              np.random.uniform(0.17, 0.18, nwalkers), #xi [km/s]
#                np.random.uniform(144.0, 146.0, nwalkers), #dpc [pc]
              np.random.uniform(44.0, 46.0, nwalkers), #inc [degrees]
              np.random.uniform(40.0, 41.0, nwalkers), #PA [degrees]
              np.random.uniform(-0.1, 0.1, nwalkers), #vz [km/s]
              np.random.uniform(-0.1, 0.1, nwalkers), #mu_a [arcsec]
              np.random.uniform(-0.1, 0.1, nwalkers)]) #mu_d [arcsec]
# Just to check we have the right shape
p0.shape
# Save the new position file to disk
np.save("pos0.npy", p0)
# Just to check that we have written the file, you can read it back in and check that it has the proper shape.
np.load("pos0.npy").shape<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11616607773851591, 'fraction_numerical': 0.04549469964664311, 'mean_word_length': 3.178966789667897, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '57607', 'license': 'MIT', 'n_tokens_mistral': 814, 'n_tokens_neox': 754, 'n_words': 262, 'path': 'assets/InitializeWalkers.vertical.ipynb', 'repo_name': 'elnjensen/DiskJockey', 'size': '2264'}