<jupyter_start><jupyter_text>Simple feasiblity studyLet's use the old Barnes'03 isochrone set to explore the exponential evolution of stars in period space<jupyter_code>BV = np.linspace(0.55,2.5,100)

plt.plot(BV, Barnes2003_I(BV, 30), label='30Myr')
plt.plot(BV, Barnes2003_I(BV, 100), label='100Myr')
plt.plot(BV, Barnes2003_I(BV, 300), label='300Myr')
plt.plot(BV, Barnes2003_I(BV, 1000), label='1 Gyr')

plt.plot(BV, Barnes2003_C(BV, 30) ,ls='--', c='C0')
plt.plot(BV, Barnes2003_C(BV, 100),ls='--', c='C1')
plt.plot(BV, Barnes2003_C(BV, 300),ls='--', c='C2')
plt.plot(BV, Barnes2003_C(BV, 1000),ls='--', c='C3')
plt.legend(fontsize=12)


plt.yscale('log')
plt.ylim(1e-1,3e2)
plt.xlabel('B-V')
plt.ylabel('Prot (days)')
plt.title('Barnes (2003)')
time = np.linspace(30,2999,100) # in Myr
BV = 1.5
print(bv2teff(BV))
plt.plot(time, Barnes2003_C(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
plt.yscale('log')
plt.xlabel('time (Myr)')
plt.ylabel('Prot (days)')
plt.legend(fontsize=12)
plt.grid(True)
dpdt = (10 - 1) / (400 * 356.25 * 1e6)
np.log10(dpdt) # this was my rough guess on paper<jupyter_output><empty_output><jupyter_text>How big is the Pdot signal?<jupyter_code>time = np.linspace(30,2999,100) # in Myr
BV = 1.5

plt.plot(time, BarnesPdot(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
plt.yscale('log')
plt.xlabel('time (Myr)')
plt.ylabel('$\dot{P}$')
plt.legend(fontsize=12)
BV = 1.5
plt.plot(Barnes2003_C(BV,time), BarnesPdot(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
# plt.xscale('log')
plt.yscale('log')
plt.xlabel('Prot (days)')
plt.ylabel('$\dot{P}$')
plt.legend(fontsize=12)
# characteristic age:
# https://astronomy.swin.edu.au/cosmos/p/pulsar+characteristic+age
BV = 1.5
plt.plot(time, Barnes2003_C(BV,time)/365.25/1e6/BarnesPdot(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
# plt.yscale('log')
plt.xlabel('time (Myr)')
plt.ylabel('Characteristic age (Myr)')
plt.legend(fontsize=12)

time = np.linspace(30,2999,100)

plt.figure()
plt.plot(time, np.log10(BarnesPdot(1, time)), label='$B-V$=1' )
plt.plot(time, np.log10(BarnesPdot(1.5, time)), label='$B-V$=1.5' )
plt.plot(time, np.log10(BarnesPdot(2, time)), label='$B-V$=2' )
plt.plot(time, np.log10(BarnesPdot(2.5, time)), label='$B-V$=2.5' )
plt.legend(fontsize=12)
plt.ylabel('$\log$ $\dot{P}$')
plt.xlabel('time (Myr)')<jupyter_output>/Users/james/Dropbox/research_projects/rapid-spin-down/code/stuff.py:22: RuntimeWarning: overflow encountered in exp
  P = 0.2 * np.exp(t / (100* (BV + 0.1 - (t/3000))**3))<jupyter_text>How big is the O-C signal?Let's use 10-year as our observing baseline<jupyter_code>time = np.linspace(30,2999,100)
    
BV=1.5
plt.plot(time, OmC(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
# plt.yscale('log')
plt.xlabel('time (Myr)')
plt.ylabel('$O-C$ (min)')
plt.legend(fontsize=12)
BV=1.5
plt.plot(Barnes2003_C(BV,time), OmC(BV, time), label='$B-V$ = 1.5', c='k', lw=2)
# plt.xscale('log')
plt.xlabel('Prot (days)')
plt.ylabel('$O-C$ (min)')
plt.legend(fontsize=12)
f=1 # no extra pdot fudgefactor yet
plt.figure()
plt.plot(time, OmC(1, time,f=f), label='$B-V$=1' )
plt.plot(time, OmC(1.5, time,f=f), label='$B-V$=1.5' )
plt.plot(time, OmC(2, time,f=f), label='$B-V$=2' )
plt.plot(time, OmC(2.5, time,f=f), label='$B-V$=2.5' )
plt.legend(fontsize=12)
plt.ylabel('10-year, $O-C$ (min)')
plt.xlabel('time (Myr)')<jupyter_output>/Users/james/Dropbox/research_projects/rapid-spin-down/code/stuff.py:22: RuntimeWarning: overflow encountered in exp
  P = 0.2 * np.exp(t / (100* (BV + 0.1 - (t/3000))**3))
{'fraction_non_alphanumeric': 0.23685714285714285, 'fraction_numerical': 0.07857142857142857, 'mean_word_length': 5.87819253438114, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, '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': '171394', 'license': 'MIT', 'n_tokens_mistral': 1902, 'n_tokens_neox': 1616, 'n_words': 270, 'path': 'code/feasibility.ipynb', 'repo_name': 'jradavenport/rapid-spin-down', 'size': '3500'}