<jupyter_start><jupyter_text>In this notebook we will open a Relion .star file containing particle data, and plot some of the features<jupyter_code>from StarIO import read_star, write_star # Star IO functions from here: https://github.com/cschlick/StarIO
import pandas as pd 
%matplotlib inline 
df_dict = read_star("examples/run_it013_data.star")
df = df_dict["data"]
print(df.columns)<jupyter_output>Index(['rlnMicrographName', 'rlnCoordinateX', 'rlnCoordinateY', 'rlnImageName',
       'rlnDefocusU', 'rlnDefocusV', 'rlnDefocusAngle', 'rlnPhaseShift',
       'rlnVoltage', 'rlnSphericalAberration', 'rlnAmplitudeContrast',
       'rlnMagnification', 'rlnDetectorPixelSize', 'rlnAngleRot',
       'rlnAngleTilt', 'rlnAnglePsi', 'rlnOriginX', 'rlnOriginY',
       'rlnCtfMaxResolution', 'rlnCtfFigureOfMerit', 'rlnGroupNumber',
       'rlnClassNumber', 'rlnNormCorrection', 'rlnLogLikeliContribution',
       'rlnMaxValueProbDistribution', 'rlnNrOfSignificantSamples',
       'rlnGroupName', 'rlnRandomSubset'],
      dtype='object')<jupyter_text>1. Check the number of particles<jupyter_code>len(df)<jupyter_output><empty_output><jupyter_text>2. Histogram the defocus range of the particles<jupyter_code>ax = df["rlnDefocusV"].hist(bins=50)
ax.set_xlabel("Defocus")<jupyter_output><empty_output><jupyter_text>3. Histogram the CTFind Max Resolution estimate<jupyter_code>ax = df["rlnCtfMaxResolution"].hist(bins=50)
ax.set_xlabel("Max Resolution (angstroms)")<jupyter_output><empty_output><jupyter_text>4. Plot both to see a correlation<jupyter_code>ax = df.plot.scatter(x="rlnCtfMaxResolution",y="rlnDefocusU")
ax = df.plot.scatter(x="rlnCoordinateX",y="rlnCoordinateY")
ax = df.plot.scatter(x="rlnMaxValueProbDistribution",y="rlnLogLikeliContribution")<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup