<jupyter_start><jupyter_text>Model cell survival<jupyter_code>def decay_calc(my_input, periods, recovery):
    #my_input = list(range(1,11))
    my_output = []  # dont start from empty list as cant append an empty list
    #periods = 5
    start = 1.0
    #recovery = 2 # recovery factor

    for i in list(range(periods)):
        my_output.extend(list(map((lambda x: start*x), my_input)))
        start = my_output[-1]*recovery
    return np.asarray(my_output)
my_norm = survival(normAB, doseGy).tolist()
my_tumour = survival(tumourAB, doseGy).tolist()
periods = 15
norm_recovery =6  # factor for recovery of normal tissue, tumour default = 1, i.e. no recovery

normal_tissue = decay_calc(my_norm, periods, norm_recovery)
tumour_tissue = decay_calc(my_tumour, periods, 1)

time_scale = np.linspace(0, periods, len(normal_tissue))

plt.plot(time_scale, normal_tissue,  color='r', label='normal tissue SF')
plt.plot(time_scale, tumour_tissue, color='b', label='tumour SF')
plt.title('%s' % normAB)
plt.yscale('log')
plt.ylabel('log survival fraction')
plt.xlabel('fraction')
plt.legend(loc='center left', bbox_to_anchor=(1, 0.5));
plt.plot(time_scale, normal_tissue/tumour_tissue, color='b', label='normal_tissue/tumour_tissue')
#plt.yscale('log')
plt.legend(loc='center left', bbox_to_anchor=(1, 0.5))
plt.ylabel('propto TCP')
plt.xlabel('fraction')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14420289855072463, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 5.836633663366337, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '118639', 'license': 'MIT', 'n_tokens_mistral': 536, 'n_tokens_neox': 497, 'n_words': 108, 'path': 'General/archive/Radiobiology model v1.ipynb', 'repo_name': 'afcarl/Useful-python', 'size': '1380'}