what is more likely to come for medical university exam for the topic cerebellum
cerebellum high yield topics medical university exam MBBS anatomy physiology
| Division | Anatomical Region | Primary Input | Function |
|---|---|---|---|
| Vestibulocerebellum | Flocculonodular lobe | Vestibular (labyrinth) | Balance, eye movements |
| Spinocerebellum | Vermis + intermediate hemispheres | Spinal cord | Synergy/coordination of ongoing movement |
| Pontocerebellum (Cerebrocerebellum) | Lateral hemispheres | Cerebral cortex via pontine nuclei | Planning and initiation of movement |
Mnemonic: VeStibulocerebellum = Vestibular/balance; SPinocerebellum = SPindle/movement synergy; PonTOcerebellum = Planning/Timing.
| Peduncle | Direction | Key Contents |
|---|---|---|
| Superior | Mainly EFFERENT | Output to red nucleus and thalamus (dentato-rubro-thalamic tract) |
| Middle | Only AFFERENT | From contralateral pontine nuclei (corticopontocerebellar tract) |
| Inferior | Mixed | Afferent from spinal cord + brainstem; efferent to vestibular nuclei |
Exam pearl: The middle cerebellar peduncle is the largest and carries only afferents. The superior cerebellar peduncle is the main output route.

| Layer | Contents | Key Features |
|---|---|---|
| Granular (innermost) | Granule cells, Golgi II cells, glomeruli | Mossy fibers synapse here on granule cell dendrites in glomeruli |
| Purkinje cell (middle) | Purkinje cells only | One cell thick; output is ALWAYS inhibitory (GABA) |
| Molecular (outermost) | Basket cells, stellate cells, parallel fibers, Purkinje dendrites | Parallel fibers run here |

| Cell | Location | Action |
|---|---|---|
| Granule cell | Granular layer | EXCITATORY (glutamate) - the ONLY excitatory interneuron |
| Purkinje cell | Purkinje layer | INHIBITORY (GABA) - sole OUTPUT of cerebellar cortex |
| Basket cell | Molecular layer | INHIBITORY (GABA) - inhibits Purkinje cells |
| Stellate cell | Molecular layer | INHIBITORY (GABA) - inhibits Purkinje cell dendrites |
| Golgi II cell | Granular layer | INHIBITORY (GABA) - inhibits granule cells (feedback) |
Exam pearl: Among all 5 cell types, only granule cells are excitatory. All others (Purkinje, basket, stellate, Golgi) are inhibitory. The Purkinje cell axon is the only output of the cerebellar cortex.
Key rule: Output of deep cerebellar nuclei to thalamus and brainstem is always EXCITATORY, despite receiving inhibitory Purkinje cell input.
| Sign | Description |
|---|---|
| Dysmetria | Overshooting/undershooting a target |
| Intention tremor | Tremor that worsens as limb approaches target (vs. resting tremor in Parkinson's) |
| Dysdiadochokinesia | Inability to perform rapid alternating movements (e.g., pronation-supination) |
| Rebound phenomenon | Cannot arrest a movement; limb swings past when resistance is removed |
| Decomposition of movement | Complex movements are broken into segments, joint by joint |
| Nystagmus | Especially with flocculonodular lesions |
| Scanning (staccato) speech | Slurred, irregular speech rhythm |
| Truncal ataxia + wide-based gait | Vermis lesions |
| Tract | Carries |
|---|---|
| Vestibulocerebellar | Vestibular impulses from labyrinths |
| Dorsal spinocerebellar | Proprioception from lower limbs (Golgi tendon organs, muscle spindles) |
| Ventral spinocerebellar | Proprioception from upper and lower limbs |
| Cuneocerebellar | Proprioception from upper limb and upper thorax |
| Pontocerebellar | Motor commands from cerebral cortex via pontine nuclei |
| Olivocerebellar | Whole-body proprioception via inferior olive - travels as climbing fibers |
Generate a one-page study cheat sheet PDF for cerebellar anatomy
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && ls -la /tmp/workspace/
mkdir -p /tmp/workspace/cerebellum-cheatsheet
~/cerebellum-cheatsheet/generate_cheatsheet.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import FrameBreak
from reportlab.lib.colors import HexColor
import os
OUTPUT = "/tmp/workspace/cerebellum-cheatsheet/Cerebellum_Cheatsheet.pdf"
# ── Colour palette ────────────────────────────────────────────────────────────
C_NAVY = HexColor("#1B3A5C")
C_TEAL = HexColor("#1E7F8E")
C_AMBER = HexColor("#E8A020")
C_ROSE = HexColor("#C0392B")
C_GREEN = HexColor("#1E7F4E")
C_LGRAY = HexColor("#F2F5F8")
C_MGRAY = HexColor("#D6DCE4")
C_WHITE = colors.white
C_BLACK = colors.black
# ── Styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
title_style = S("TitleStyle",
fontSize=20, fontName="Helvetica-Bold",
textColor=C_WHITE, alignment=TA_CENTER,
spaceAfter=2)
subtitle_style = S("SubtitleStyle",
fontSize=9, fontName="Helvetica",
textColor=HexColor("#CCE4EE"), alignment=TA_CENTER,
spaceAfter=0)
sec_style = S("SecStyle",
fontSize=8.5, fontName="Helvetica-Bold",
textColor=C_WHITE, alignment=TA_LEFT,
leftPadding=4, spaceBefore=1, spaceAfter=1)
body_style = S("BodyStyle",
fontSize=7.2, fontName="Helvetica",
textColor=C_BLACK, leading=10,
leftPadding=0, spaceBefore=0)
body_bold = S("BodyBold",
fontSize=7.2, fontName="Helvetica-Bold",
textColor=C_NAVY, leading=10)
small_style = S("SmallStyle",
fontSize=6.5, fontName="Helvetica",
textColor=HexColor("#444444"), leading=9)
mnemonic_style = S("MnemonicStyle",
fontSize=7.4, fontName="Helvetica-BoldOblique",
textColor=C_ROSE, leading=10,
backColor=HexColor("#FFF4E5"),
borderPadding=(2,4,2,4))
pearl_style = S("PearlStyle",
fontSize=7.0, fontName="Helvetica-Oblique",
textColor=HexColor("#1B3A5C"), leading=10,
backColor=HexColor("#EAF4FF"),
borderPadding=(2,4,2,4))
# ── Helper: coloured section header ──────────────────────────────────────────
def sec_header(text, color=C_NAVY):
data = [[Paragraph(f"<b>{text}</b>", S("sh",
fontSize=8, fontName="Helvetica-Bold", textColor=C_WHITE,
alignment=TA_LEFT))]]
t = Table(data, colWidths=["100%"])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 6),
]))
return t
def P(txt, style=body_style): return Paragraph(txt, style)
def SP(h=2): return Spacer(1, h)
# ── Build content ─────────────────────────────────────────────────────────────
story = []
# ─── TITLE BANNER ─────────────────────────────────────────────────────────────
banner_data = [[
Paragraph("CEREBELLUM", S("T2", fontSize=22, fontName="Helvetica-Bold",
textColor=C_WHITE, alignment=TA_CENTER)),
Paragraph("Anatomy & Physiology · Exam Cheat Sheet",
S("T3", fontSize=9, fontName="Helvetica", textColor=HexColor("#CCE4EE"),
alignment=TA_CENTER))
]]
banner = Table([[
Paragraph("🧠 CEREBELLUM — Anatomy & Physiology Cheat Sheet",
S("tb", fontSize=15, fontName="Helvetica-Bold",
textColor=C_WHITE, alignment=TA_CENTER))
]], colWidths=[190*mm])
banner.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), C_NAVY),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING",(0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 6),
("ROUNDEDCORNERS", [4, 4, 4, 4]),
]))
story.append(banner)
story.append(SP(5))
# ─── ROW 1: Functional Divisions | Peduncles ──────────────────────────────────
# Left: Functional Divisions
div_header = sec_header("⚡ FUNCTIONAL DIVISIONS", C_TEAL)
div_data = [
[P("<b>Division</b>", body_bold), P("<b>Region</b>", body_bold), P("<b>Input</b>", body_bold), P("<b>Function</b>", body_bold)],
[P("Vestibulocerebellum", body_style), P("Flocculonodular lobe", small_style), P("Vestibular (labyrinth)", small_style), P("Balance, eye movements", small_style)],
[P("Spinocerebellum", body_style), P("Vermis + intermediate", small_style), P("Spinal cord", small_style), P("Synergy of ongoing movement", small_style)],
[P("Pontocerebellum", body_style), P("Lateral hemispheres", small_style), P("Cerebral cortex → pons", small_style), P("Planning & initiation", small_style)],
]
div_table = Table(div_data, colWidths=[28*mm, 30*mm, 34*mm, 36*mm])
div_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), C_LGRAY),
("BACKGROUND", (0,2), (-1,2), C_WHITE),
("BACKGROUND", (0,3), (-1,3), C_LGRAY),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
# Right: Peduncles
ped_header = sec_header("🔗 CEREBELLAR PEDUNCLES", C_ROSE)
ped_data = [
[P("<b>Peduncle</b>", body_bold), P("<b>Direction</b>", body_bold), P("<b>Key Contents</b>", body_bold)],
[P("Superior (SCP)", body_style), P("<font color='#C0392B'>Mainly EFFERENT</font>", small_style), P("Dentato-rubro-thalamic tract", small_style)],
[P("Middle (MCP)", body_style), P("<font color='#1E7F8E'>Only AFFERENT</font>", small_style), P("Corticopontocerebellar (LARGEST)", small_style)],
[P("Inferior (ICP)", body_style), P("Mixed", small_style), P("Spinocerebellar, vestibular", small_style)],
]
ped_table = Table(ped_data, colWidths=[26*mm, 24*mm, 40*mm])
ped_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), C_LGRAY),
("BACKGROUND", (0,2), (-1,2), C_WHITE),
("BACKGROUND", (0,3), (-1,3), C_LGRAY),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
row1 = Table([
[div_header, SP(3), ped_header],
[div_table, SP(3), ped_table],
], colWidths=[131*mm, 4*mm, 93*mm])
row1.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING",(0,0), (-1,-1), 0),
]))
story.append(row1)
story.append(SP(5))
# ─── ROW 2: Cortical Layers | Cell Types ──────────────────────────────────────
layer_header = sec_header("🔬 CORTICAL LAYERS (outer → inner)", C_GREEN)
layer_data = [
[P("<b>Layer</b>", body_bold), P("<b>Contents</b>", body_bold), P("<b>Notes</b>", body_bold)],
[P("Molecular (outer)", body_style), P("Basket cells, stellate cells, parallel fibers, Purkinje dendrites", small_style), P("Parallel fibers run here", small_style)],
[P("Purkinje cell (middle)", body_style), P("Purkinje cells only", small_style), P("1 cell thick · output ALWAYS inhibitory (GABA)", small_style)],
[P("Granular (inner)", body_style), P("Granule cells, Golgi II cells, glomeruli", small_style), P("Mossy fibers synapse here; glomeruli = complex synapse clusters", small_style)],
]
layer_table = Table(layer_data, colWidths=[36*mm, 60*mm, 64*mm])
layer_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), C_LGRAY),
("BACKGROUND", (0,2), (-1,2), C_WHITE),
("BACKGROUND", (0,3), (-1,3), C_LGRAY),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
# Cell types
cell_header = sec_header("🧬 5 CELL TYPES — EXCITATORY vs INHIBITORY", C_AMBER)
cell_data = [
[P("<b>Cell</b>", body_bold), P("<b>Layer</b>", body_bold), P("<b>Type</b>", body_bold), P("<b>Key Role</b>", body_bold)],
[P("Granule", body_style), P("Granular", small_style), P("<font color='#1E7F4E'><b>EXCIT (Glu)</b></font>", small_style), P("→ parallel fibers → Purkinje", small_style)],
[P("Purkinje", body_style), P("Purkinje", small_style), P("<font color='#C0392B'><b>INHIB (GABA)</b></font>", small_style), P("SOLE OUTPUT of cortex", small_style)],
[P("Basket", body_style), P("Molecular", small_style), P("<font color='#C0392B'><b>INHIB (GABA)</b></font>", small_style), P("Inhibits Purkinje cell soma", small_style)],
[P("Stellate", body_style), P("Molecular", small_style), P("<font color='#C0392B'><b>INHIB (GABA)</b></font>", small_style), P("Inhibits Purkinje dendrites", small_style)],
[P("Golgi II", body_style), P("Granular", small_style), P("<font color='#C0392B'><b>INHIB (GABA)</b></font>", small_style), P("Feedback: inhibits granule cells", small_style)],
]
cell_table = Table(cell_data, colWidths=[22*mm, 22*mm, 30*mm, 44*mm])
cell_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), HexColor("#E8F8EE")),
("BACKGROUND", (0,2), (-1,2), HexColor("#FFF0EE")),
("BACKGROUND", (0,3), (-1,3), HexColor("#FFF0EE")),
("BACKGROUND", (0,4), (-1,4), HexColor("#FFF0EE")),
("BACKGROUND", (0,5), (-1,5), HexColor("#FFF0EE")),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
row2 = Table([
[layer_header, SP(3), cell_header],
[layer_table, SP(3), cell_table],
], colWidths=[163*mm, 4*mm, 61*mm])
row2.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING",(0,0), (-1,-1), 0),
]))
story.append(row2)
story.append(SP(5))
# ─── ROW 3: Afferent Fibers | Deep Nuclei ────────────────────────────────────
fiber_header = sec_header("📥 AFFERENT FIBER SYSTEMS", C_TEAL)
fiber_data = [
[P("<b>Climbing Fibers</b>", body_bold), P("<b>Mossy Fibers</b>", body_bold)],
[
P("Origin: <b>Inferior olivary nucleus</b> (medulla)<br/>"
"→ Synapse directly on Purkinje cell dendrites<br/>"
"→ <b>1 climbing fiber per Purkinje cell</b><br/>"
"→ Produce <b>complex spikes</b><br/>"
"→ Role in <b>motor learning</b><br/>"
"→ Activity ↑ when learning a NEW movement", small_style),
P("Origin: ALL others (spinocerebellar, vestibulocerebellar, pontocerebellar)<br/>"
"→ Synapse on <b>granule cells</b> in glomeruli<br/>"
"→ Granule cells → <b>parallel fibers</b> → Purkinje<br/>"
"→ 1 Purkinje cell receives up to <b>250,000 parallel fibers</b><br/>"
"→ Produce <b>simple spikes</b><br/>"
"→ Majority of cerebellar input", small_style),
],
]
fiber_table = Table(fiber_data, colWidths=[87*mm, 88*mm])
fiber_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (0,1), HexColor("#EAF4FF")),
("BACKGROUND", (1,1), (1,1), HexColor("#F0FBF5")),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 4),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
# Deep nuclei
nuc_header = sec_header("🏛 DEEP CEREBELLAR NUCLEI (lateral → medial)", C_ROSE)
nuc_data = [
[P("<b>Nucleus</b>", body_bold), P("<b>Receives from</b>", body_bold), P("<b>Projects to</b>", body_bold)],
[P("<b>Dentate</b> (most lateral)", small_style), P("Lateral hemispheres", small_style), P("Red nucleus + thalamus via SCP", small_style)],
[P("Emboliform", small_style), P("Intermed. hemisphere", small_style), P("Red nucleus", small_style)],
[P("Globose", small_style), P("Intermed. hemisphere", small_style), P("Red nucleus", small_style)],
[P("<b>Fastigial</b> (most medial)", small_style), P("Vermis", small_style), P("Vestibular nuclei via ICP", small_style)],
]
nuc_table = Table(nuc_data, colWidths=[44*mm, 40*mm, 41*mm])
nuc_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), HexColor("#FFF0EE")),
("BACKGROUND", (0,2), (-1,2), C_LGRAY),
("BACKGROUND", (0,3), (-1,3), C_LGRAY),
("BACKGROUND", (0,4), (-1,4), HexColor("#FFF0EE")),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
row3_top = Table([
[fiber_header, SP(3), nuc_header],
[fiber_table, SP(3), nuc_table],
], colWidths=[178*mm, 4*mm, 128*mm])
row3_top.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 0),
]))
story.append(row3_top)
story.append(SP(5))
# ─── ROW 4: Clinical Signs | Lesion Localization | Mnemonics ─────────────────
signs_header = sec_header("⚠ SIGNS OF CEREBELLAR DISEASE", C_ROSE)
signs_data = [
[P("<b>Sign</b>", body_bold), P("<b>Description</b>", body_bold)],
[P("Ataxia", small_style), P("<b>IPSILATERAL</b> to lesion; wide-based unsteady gait", small_style)],
[P("Dysmetria", small_style), P("Overshooting/undershooting target", small_style)],
[P("Intention tremor", small_style), P("Worsens near target (vs resting tremor in Parkinson's)", small_style)],
[P("Dysdiadochokinesia", small_style), P("Cannot do rapid alternating movements", small_style)],
[P("Rebound phenomenon", small_style), P("Cannot arrest movement when resistance removed", small_style)],
[P("Decomposition", small_style), P("Breaks multi-joint movement into separate joints", small_style)],
[P("Nystagmus", small_style), P("Especially flocculonodular lesion", small_style)],
[P("Scanning speech", small_style), P("Slurred, staccato, irregular rhythm", small_style)],
]
signs_table = Table(signs_data, colWidths=[34*mm, 70*mm])
signs_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
*[("BACKGROUND", (0,i), (-1,i), C_LGRAY if i%2==0 else C_WHITE) for i in range(1,9)],
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
# Localization
loc_header = sec_header("📍 LESION LOCALIZATION", C_GREEN)
loc_data = [
[P("<b>Lesion Site</b>", body_bold), P("<b>Features</b>", body_bold)],
[P("Flocculonodular lobe", small_style), P("Truncal ataxia + nystagmus + vertigo/N&V · NO limb ataxia", small_style)],
[P("Vermis", small_style), P("Gait/truncal ataxia (proximal muscles)", small_style)],
[P("Lateral hemisphere", small_style), P("Ipsilateral limb ataxia, intention tremor, dysdiadochokinesia", small_style)],
[P("Child + lateral", small_style), P("Think Medulloblastoma (most common pediatric brain tumour)", small_style)],
]
loc_table = Table(loc_data, colWidths=[34*mm, 72*mm])
loc_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_MGRAY),
("BACKGROUND", (0,1), (-1,1), C_LGRAY),
("BACKGROUND", (0,2), (-1,2), C_WHITE),
("BACKGROUND", (0,3), (-1,3), C_LGRAY),
("BACKGROUND", (0,4), (-1,4), HexColor("#FFF0EE")),
("GRID", (0,0), (-1,-1), 0.4, C_MGRAY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
# Mnemonics box
mn_header = sec_header("💡 MNEMONICS & PEARLS", C_AMBER)
pearls = [
("Only EXCITATORY cell:", "Granule cell (glutamate). All others = GABA inhibitory."),
("Purkinje cell output:", "SOLE cortical output · ALWAYS GABA inhibitory → deep nuclei"),
("Deep nuclei output:", "ALWAYS EXCITATORY (to thalamus/brainstem) despite inhibitory Purkinje input"),
("MCP = largest peduncle:", "Contains ONLY afferents (pontocerebellar)"),
("Climbing fibers:", "1 per Purkinje · from inferior olive · motor learning · complex spikes"),
("Deep nuclei (lat→med):", "Don't Eat Greasy Food (Dentate · Emboliform · Globose · Fastigial)"),
("Divisions mnemonic:", "VeStibulo = Vestibular/balance | SPino = Synergy | PonTo = Planning/Timing"),
("Cerebellar vs Cortical:", "Cerebellar signs IPSILATERAL · Cortical signs CONTRALATERAL"),
]
mn_content = ""
for k, v in pearls:
mn_content += f"<b>• {k}</b> {v}<br/>"
mn_para = Paragraph(mn_content, S("mns",
fontSize=6.8, fontName="Helvetica", leading=10,
textColor=C_BLACK))
mn_cell = Table([[mn_para]], colWidths=[90*mm])
mn_cell.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), HexColor("#FFFBF0")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("BOX", (0,0), (-1,-1), 0.5, C_AMBER),
]))
# Assemble right column
right_col = Table([
[loc_header],
[loc_table],
[SP(4)],
[mn_header],
[mn_cell],
], colWidths=[109*mm])
right_col.setStyle(TableStyle([
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 0),
]))
row4 = Table([
[signs_header, SP(3), right_col],
[signs_table, SP(3), ""],
], colWidths=[107*mm, 4*mm, 117*mm])
row4.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 0),
("SPAN", (2,0), (2,1)),
]))
story.append(row4)
story.append(SP(5))
# ─── FOOTER ──────────────────────────────────────────────────────────────────
footer_data = [[
Paragraph(
"Sources: Costanzo Physiology 7e · Ganong's Review of Medical Physiology 26e · Neuroanatomy through Clinical Cases 3e | © Orris Medical Study Aid",
S("ft", fontSize=5.8, fontName="Helvetica-Oblique",
textColor=HexColor("#888888"), alignment=TA_CENTER))
]]
footer = Table(footer_data, colWidths=[190*mm])
footer.setStyle(TableStyle([
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0), (-1,-1), 3),
("LINEABOVE", (0,0), (-1,0), 0.5, C_MGRAY),
]))
story.append(footer)
# ─── Build PDF ────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=10*mm, rightMargin=10*mm,
topMargin=10*mm, bottomMargin=8*mm,
)
doc.build(story)
print(f"PDF saved to: {OUTPUT}")
cd /tmp/workspace/cerebellum-cheatsheet && python generate_cheatsheet.py 2>&1
ls -lh /tmp/workspace/cerebellum-cheatsheet/Cerebellum_Cheatsheet.pdf
python3 -c " from pypdf import PdfReader r = PdfReader('/tmp/workspace/cerebellum-cheatsheet/Cerebellum_Cheatsheet.pdf') print(f'Pages: {len(r.pages)}') print(f'Page size: {r.pages[0].mediabox}') text = r.pages[0].extract_text() print(f'Text length: {len(text)} chars') print('First 300 chars:', text[:300]) "
Cerebellum Cheatsheet
PDF Document · PDF
| Section | Content |
|---|---|
| Functional Divisions | Vestibulocerebellum / Spinocerebellum / Pontocerebellum table |
| Cerebellar Peduncles | Superior / Middle / Inferior with direction + key contents |
| Cortical Layers | Molecular / Purkinje / Granular with contents and notes |
| 5 Cell Types | Excitatory vs Inhibitory colour-coded table |
| Afferent Fibers | Climbing vs Mossy fibers side-by-side comparison |
| Deep Nuclei | Dentate, Emboliform, Globose, Fastigial (lateral → medial) |
| Clinical Signs | All 8 signs of cerebellar disease |
| Lesion Localization | Flocculonodular / Vermis / Lateral hemisphere + medulloblastoma |
| Mnemonics & Pearls | 8 high-yield exam pearls including "Don't Eat Greasy Food" |