<jupyter_start><jupyter_text>Some examples  linear and circular states<jupyter_code>ax=plt.subplots(3,2)[1];
ellipt,orient=stokes2ellipse([1,1,0,0]) # Llinear 0
plotEllipse(ellipt,orient,axes=ax[0,0])

ellipt,orient=stokes2ellipse([1,-1,0,0]) # Linear 90
plotEllipse(ellipt,orient,axes=ax[0,1])

ellipt,orient=stokes2ellipse([1,0,1,0]) # Linear 45
plotEllipse(ellipt,orient,axes=ax[1,0])

ellipt,orient=stokes2ellipse([1,0,-1,0]) # Linear 135
plotEllipse(ellipt,orient,axes=ax[1,1])

ellipt,orient=stokes2ellipse([1,0,0,1]) # Linear RCP
plotEllipse(ellipt,orient,axes=ax[2,0])

ellipt,orient=stokes2ellipse([1,0,0,-1]) # Linear LCP
plotEllipse(ellipt,orient,axes=ax[2,1])<jupyter_output><empty_output><jupyter_text>Universal compensator<jupyter_code>M_uni=  M_Retarder(theta=0,delta=np.pi) * M_Retarder(theta=np.pi/4,delta=np.pi/2)

inputpol = sp.Matrix([1, 1, 0, 0])
S_outuni = M_uni_np * inputpol
ellipt,orient=stokes2ellipse(np.array(S_outuni).astype(np.float64)) # Llinear 0
plotEllipse(ellipt,orient)<jupyter_output><empty_output><jupyter_text>Test interactive plotting<jupyter_code>interact(plotEllipse,ellipt=(-1,1,0.1),\
         orient=(0,np.pi,np.pi/180),size=fixed(5),axes=fixed(None));<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17685411572942136, 'fraction_numerical': 0.059494702526487364, 'mean_word_length': 11.926315789473684, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '31716', 'license': 'Unlicense', 'n_tokens_mistral': 589, 'n_tokens_neox': 548, 'n_words': 48, 'path': 'simulations/test_plotEllipse.ipynb', 'repo_name': 'czbiohub/reconstruct-order', 'size': '1227'}