<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Tests overlaying rule 18 values on top of spacetime diagram
Step1:  Tests overlaying inferred states on top of rule 18 spacetime diagram
<ASSISTANT_TASK:>
Python Code:
overlay_test(rule_18.get_spacetime(),rule_18.get_spacetime(),t_max=20, x_max=20, text_color='red')
overlay_test(rule_18.get_spacetime(),rule_18.get_spacetime(),t_max=20, x_max=20, colors=plt.cm.Set2, text_color='black')
overlay_test(rule_18.get_spacetime(),rule_18.get_spacetime(),t_max=20, x_max=20, colorbar=True)
Explanation: Tests overlaying rule 18 values on top of spacetime diagram
End of explanation
rule_18 = ECA(18, domain_18(500))
rule_18.evolve(500)
states_18 = epsilon_field(rule_18.get_spacetime())
states_18.estimate_states(3,3,1,alpha=0)
states_18.filter_data()
overlay_test(rule_18.get_spacetime(), states_18.get_causal_field(), t_min=200, t_max=240, x_min=200, x_max=240)
overlay_test(rule_18.get_spacetime(), states_18.get_causal_field(), t_min=200, t_max=220, x_min=200, x_max=220)
print states_18.get_causal_field()[200:220, 200:220]
Explanation: Tests overlaying inferred states on top of rule 18 spacetime diagram
End of explanation
<END_TASK>