Plasy now here is the ECG book go through it and teach me everything about it okay.. like start form basics and ask question in steps
cd /home/daytona/workspace/attachments/32e66194-d8be-4297-967a-8d8f371e3c2a/ && python3 -c " import pdfplumber with pdfplumber.open('A_Handbook_of_ECG_by_Dr_Sarbagya_61791aaa-68ab-4549-a6b5-e5eebfc71f6f.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') # Extract first 10 pages to understand structure for i in range(min(10, len(pdf.pages))): text = pdf.pages[i].extract_text() print(f'\\n=== PAGE {i+1} ===') print(text[:1000] if text else '[No text]') "
| Square | Size | Time (horizontal) | Voltage (vertical) |
|---|---|---|---|
| Small square | 1 mm | 0.04 seconds | 0.1 mV |
| Large square | 5 mm (= 5 small squares) | 0.20 seconds | 0.5 mV |
| 5 large squares | 25 mm | 1 second | - |
| Wave/Interval | What it represents | Normal values |
|---|---|---|
| P wave | Atrial depolarisation (atria contract) | < 0.12 s, < 2.5 mm tall |
| PR interval | Atrial depol. + AV node delay | 0.12 - 0.20 s |
| QRS complex | Ventricular depolarisation (ventricles contract) | < 0.12 s |
| ST segment | Early repolarisation plateau | Isoelectric (flat) |
| T wave | Ventricular repolarisation | Upright in most leads |
| Territory | Leads | Usual artery |
|---|---|---|
| Inferior wall | II, III, aVF | RCA |
| Lateral wall | I, aVL, V5, V6 | LCx / diagonal |
| Anterior/Septal | V1 - V4 | LAD |
| Posterior | V7-V9 (mirror in V1-V3) | RCA / LCx |
Clinical Pearl: Lead aVR looks at the heart from the right shoulder - so almost everything is normally inverted in it. But ST elevation in aVR + widespread ST depression = left main or proximal LAD occlusion. Very ominous!
How can I this specific conversation so that we can start later too form where we left
"Continue my ECG course, progress file is at /home/daytona/workspace/ecg-course/progress.md"
"We were studying the ECG handbook by Dr. Sarbagya. We finished Lesson 1 (ECG paper basics, the waves, the 12 leads) and I was about to answer Question 1 about QRS width."
Yes
mkdir -p /home/daytona/workspace/ecg-course
~/ecg-course/progress.md
# ๐ ECG Course Progress Tracker **Book:** A Handbook of ECG by Dr. Sarbagya (207 pages) **File:** /home/daytona/workspace/attachments/32e66194-d8be-4297-967a-8d8f371e3c2a/A_Handbook_of_ECG_by_Dr_Sarbagya_61791aaa-68ab-4549-a6b5-e5eebfc71f6f.pdf --- ## ๐ CURRENT POSITION - **Last completed lesson:** Lesson 1 - The Grammar of the ECG (Chapter 1) - **Currently pending:** Student needs to answer Question 1 - **Next lesson:** Lesson 2 - The 11-Step System (Chapter 2) --- ## โ LESSONS COMPLETED ### Lesson 1 - The ECG Paper & Basics (Chapter 1) โ **Topics covered:** - ECG paper runs at 25 mm/s; calibration 10 mm = 1 mV - Small square = 1 mm = 0.04 s horizontally, 0.1 mV vertically - Large square = 5 small squares = 0.20 s, 0.5 mV - 5 large squares = 1 second - The waves: P wave, PR interval, QRS, ST segment, T wave (normal values) - 12 leads = 12 viewpoints, not 12 separate signals - Lead territories: Inferior (II,III,aVF), Lateral (I,aVL,V5,V6), Anterior (V1-V4), Posterior (V7-V9) - Clinical pearl: ST elevation in aVR = left main / proximal LAD occlusion **Question 1 asked (PENDING ANSWER):** > "The ECG paper runs at 25 mm/second. A QRS complex is 3 small squares wide. How long is this QRS complex in seconds? Is it normal or abnormal?" > **Correct answer:** 3 x 0.04 = 0.12 s โ this is at the upper border of normal (normal QRS < 0.12 s), so technically borderline/normal upper limit. --- ## ๐ QUIZ SCORES | Question | Asked | Student Answer | Correct? | |---|---|---|---| | Q1 - QRS width calculation | Lesson 1 | PENDING | - | --- ## ๐ BOOK STRUCTURE (48 Chapters) ### PART I - FOUNDATIONS - [x] Ch.1 - The grammar of the ECG (paper, squares, intervals) - [ ] Ch.2 - A system you will never abandon (11 steps) - [ ] Ch.3 - Rate - [ ] Ch.4 - Axis and the hemiblocks ### PART II - RHYTHM - [ ] Ch.5 - Supraventricular rhythms - [ ] Ch.6 - Atrial fibrillation, flutter and the irregular pulse - [ ] Ch.7 - Broad-complex tachycardias (VT) - [ ] Ch.8 - Pre-excitation and WPW ### PART III - CONDUCTION - [ ] Ch.9 - AV blocks, fascicles and the failing escape - [ ] Ch.10 - Bundle branch block and diagnosing MI within it ### PART IV - ISCHAEMIA - [ ] Ch.11 - STEMI, territories and the reciprocal mirror - [ ] Ch.12 - STEMI-equivalents (Wellens, De Winter, posterior, aVR) - [ ] Ch.13 - T-wave inversion (full differential) ### PART V - THE GREAT MIMICS - [ ] Ch.14 - Electrolytes (potassium, calcium, magnesium) - [ ] Ch.15 - Drugs and the ECG (digoxin, QT and the channels) - [ ] Ch.16 - Pericarditis, tamponade, PE and structural patterns ### PART VI - DEEP PHYSIOLOGY - [ ] Ch.17 - Channelopathies - [ ] Ch.18 - Two cells, two action potentials - [ ] Ch.19 - Mechanisms of arrhythmia - [ ] Ch.20 - Antiarrhythmic drugs - [ ] Ch.21 - Hidden conduction ### PART VII - CHAMBER WALLS - [ ] Ch.22 - Ventricular hypertrophy (LVH, RVH) - [ ] Ch.23 - Atrial enlargement - [ ] Ch.24 - Pulmonary hypertension ### PART VIII - TACHYCARDIAS IN DEPTH - [ ] Ch.25 - AVNRT in detail - [ ] Ch.26 - AVRT in detail - [ ] Ch.27 - Premature beats (PAC, PJC, PVC) - [ ] Ch.28 - MAT, AIVR and bidirectional VT - [ ] Ch.29 - Aberrancy phenomena - [ ] Ch.30 - Sick sinus syndrome ### PART IX - DEEPER ISCHAEMIA - [ ] Ch.31 - Pathological Q waves - [ ] Ch.32 - Posterior MI in detail - [ ] Ch.33 - ARVC and Brugada phenotype - [ ] Ch.34 - Early repolarisation ### PART X - INTERVENTIONS - [ ] Ch.35 - Adenosine - [ ] Ch.36 - QT interval (Bazett, Fridericia) - [ ] Ch.37 - Cardioversion and defibrillation - [ ] Ch.38 - Pacing modes and malfunctions - [ ] Ch.39 - Overdrive pacing - [ ] Ch.40 - Exercise stress test ### PART XI - BEYOND THE PATTERNS - [ ] Ch.41 - Atrial flutter in detail - [ ] Ch.42 - Junctional rhythms - [ ] Ch.43 - Takotsubo cardiomyopathy - [ ] Ch.44 - ECG technique, lead placement, reversals - [ ] Ch.45 - Cardiac arrest rhythms - [ ] Ch.46 - Spot-diagnosis atlas ### PART XII - AT THE BEDSIDE - [ ] Ch.47 - Fifty ward vignettes - [ ] Ch.48 - Quick-fire patterns --- ## ๐๏ธ STUDENT NOTES *(Add notes here as the course progresses)* --- ## โถ๏ธ HOW TO RESUME In a new conversation, say: > "Continue my ECG course. My progress file is at /home/daytona/workspace/ecg-course/progress.md. The ECG book is at /home/daytona/workspace/attachments/32e66194-d8be-4297-967a-8d8f371e3c2a/A_Handbook_of_ECG_by_Dr_Sarbagya_61791aaa-68ab-4549-a6b5-e5eebfc71f6f.pdf" *Last updated: July 13, 2026*
progress
MD File ยท MD
"Continue my ECG course. My progress file is at /home/daytona/workspace/ecg-course/progress.md"
The ECG paper runs at 25 mm/second. A QRS complex is 3 small squares wide. How long is it in seconds? Is it normal or abnormal?
Normal because it's not less than 0.12
0.12 s = โ Abnormal (broad QRS)
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
| Step | What you check |
|---|---|
| 1. Rate | Too fast, too slow, or normal? |
| 2. Rhythm | Regular? P before every QRS? |
| 3. Axis | Normal, left, right, or northwest? |
| 4. P wave | Present? Mitrale? Pulmonale? |
| 5. PR interval | Short (pre-excitation) or long (block)? |
| 6. QRS | Narrow or broad? Voltage? Q waves? |
| 7. ST segment | Elevated, depressed, or flat? |
| 8. T wave | Upright, flat, inverted, or peaked? |
| 9. QT interval | Corrected and measured |
| 10. U wave | Present and prominent? |
| 11. SYNTHESIS | Now look back at the patient |
Golden Rule from the book: "What is the very first thing you do when handed any ECG on the ward?" Answer: Look at the PATIENT before the paper. A VT in a chatting, comfortable patient is managed completely differently from the same VT in a pulseless one. Never let a machine override your eyes - automated reports miss posterior MI, De Winter T waves, Wellens patterns, and subtle ST elevation.
Since automated ECG machine may miss some important finding such a as posterior mi or einterd
Answer: Look at the PATIENT first! Clinical stability decides everything. The same VT rhythm means something completely different in a patient who is chatting comfortably vs. one who is pulseless. Paper can wait 5 seconds; an unstable patient cannot.
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
| Large squares between R-R | Rate (bpm) |
|---|---|
| 1 | 300 |
| 2 | 150 |
| 3 | 100 |
| 4 | 75 |
| 5 | 60 |
| 6 | 50 |
| Label | Rate |
|---|---|
| Normal sinus rhythm | 60 - 100 bpm |
| Sinus tachycardia | > 100 bpm |
| Sinus bradycardia | < 60 bpm |
A regular tachycardia sitting at exactly 150 bpm should make you think atrial flutter with 2:1 block - NOT sinus tachycardia!
75 Normal Atrial flutter with 2:1 block
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
| Lead I | aVF | Axis |
|---|---|---|
| โ Positive (upright) | โ Positive (upright) | Normal (-30ยฐ to +90ยฐ) |
| โ Positive | โ Negative (inverted) | Left Axis Deviation (LAD) |
| โ Negative | โ Positive | Right Axis Deviation (RAD) |
| โ Negative | โ Negative | Northwest axis (extreme / indeterminate) |
| Deviation | Common Causes |
|---|---|
| Left (LAD) | Left anterior hemiblock, LVH, inferior MI, WPW |
| Right (RAD) | RVH, pulmonary hypertension, PE, lateral MI, WPW, normal in children/tall thin people |
| Northwest | Ventricular tachycardia, hyperkalaemia, pacemaker |
Memory trick for axis: Think of Lead I as pointing LEFT and aVF pointing DOWN. If the heart's electrical arrow points left and down = normal. If it swings too far left = LAD. Too far right = RAD.
Left axis deviation Left anterior fasicle hemiblock Lvh inferior mi wpw
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
| Lesson | Topic | Score |
|---|---|---|
| Lesson 1 | ECG paper & waves | โ Good |
| Lesson 2 | 11-step system | โ Good |
| Lesson 3 | Rate calculation | โ Perfect |
| Lesson 4 | Axis | โ Perfect |
Normal origin (SA node)
โโโ Sinus rhythm (60-100)
โโโ Sinus tachycardia (>100)
โโโ Sinus bradycardia (<60)
Atrial origin
โโโ Atrial fibrillation (AF) - irregularly irregular
โโโ Atrial flutter - sawtooth, usually 150 bpm
โโโ Atrial tachycardia - P waves present but abnormal shape
AV nodal origin
โโโ AVNRT - most common SVT
โโโ Junctional rhythm
Narrow QRS = SVT (origin above ventricles) Broad QRS = VT until proven otherwise (assume ventricular origin - dangerous!)
| Rhythm | Rate | Regular? | P waves |
|---|---|---|---|
| Sinus rhythm | 60-100 | โ Regular | Upright in II, before every QRS |
| Sinus tachycardia | >100 | โ Regular | Present, upright |
| Atrial flutter | ~150 (with 2:1) | โ Regular | Sawtooth at 300/min |
| AF | Variable | โ Irregularly irregular | No P waves - chaotic baseline |
| AVNRT | 150-250 | โ Regular | Hidden in/near QRS |
Generate a cheat sheet PDF with the 11-step system and key findings
python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.units import mm from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, HRFlowable from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.platypus import KeepTogether output_path = "/home/daytona/workspace/ecg-course/ECG_Cheat_Sheet.pdf" doc = SimpleDocTemplate(output_path, pagesize=A4, leftMargin=15*mm, rightMargin=15*mm, topMargin=15*mm, bottomMargin=15*mm) styles = getSampleStyleSheet() # Custom styles title_style = ParagraphStyle('Title', parent=styles['Normal'], fontSize=22, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a1a2e'), alignment=TA_CENTER, spaceAfter=2) subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'], fontSize=11, fontName='Helvetica', textColor=colors.HexColor('#e94560'), alignment=TA_CENTER, spaceAfter=8) section_style = ParagraphStyle('Section', parent=styles['Normal'], fontSize=12, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_LEFT, spaceAfter=2, spaceBefore=6) body_style = ParagraphStyle('Body', parent=styles['Normal'], fontSize=9, fontName='Helvetica', textColor=colors.HexColor('#1a1a2e'), spaceAfter=2, leading=13) pearl_style = ParagraphStyle('Pearl', parent=styles['Normal'], fontSize=8.5, fontName='Helvetica-Oblique', textColor=colors.HexColor('#b5451b'), spaceAfter=3, leading=12, leftIndent=6) W = 180*mm # usable width def section_header(text, color='#16213e'): data = [[Paragraph(text, ParagraphStyle('SH', parent=styles['Normal'], fontSize=11, fontName='Helvetica-Bold', textColor=colors.white))]] t = Table(data, colWidths=[W]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(color)), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 8), ('ROUNDEDCORNERS', [4,4,4,4]), ])) return t story = [] # โโ TITLE โโ story.append(Paragraph("ECG CHEAT SHEET", title_style)) story.append(Paragraph("A Handbook of ECG ยท Dr. Sarbagya ยท Quick Reference", subtitle_style)) story.append(HRFlowable(width=W, thickness=2, color=colors.HexColor('#e94560'))) story.append(Spacer(1, 5)) # โโ SECTION 1: 11 STEPS โโ story.append(section_header("THE 11-STEP SYSTEM โ Run This Every Single Time")) story.append(Spacer(1, 4)) steps_data = [ ["Step", "What to Check", "Key Question"], ["1", "RATE", "Too fast (>100) / Too slow (<60) / Normal (60-100)?"], ["2", "RHYTHM", "Regular? P before every QRS?"], ["3", "AXIS", "Normal / Left / Right / Northwest?"], ["4", "P WAVE", "Present? Mitrale? Pulmonale?"], ["5", "PR INTERVAL", "Short = pre-excitation | Long = AV block"], ["6", "QRS", "Narrow (<0.12s) or Broad (>0.12s)? Q waves? Voltage?"], ["7", "ST SEGMENT", "Elevated / Depressed / Flat (isoelectric)?"], ["8", "T WAVE", "Upright / Flat / Inverted / Peaked?"], ["9", "QT INTERVAL", "Corrected (QTc) โ prolonged = dangerous"], ["10", "U WAVE", "Present and prominent? (think hypokalaemia)"], ["11", "SYNTHESIS", "Look back at the patient. Correlate clinically!"], ] t = Table(steps_data, colWidths=[12*mm, 38*mm, 130*mm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e94560')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,0), 9), ('BACKGROUND', (0,1), (-1,-1), colors.HexColor('#f8f9fa')), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f4ff'), colors.white]), ('FONTNAME', (0,1), (-1,-1), 'Helvetica'), ('FONTSIZE', (0,1), (-1,-1), 8.5), ('FONTNAME', (0,1), (1,-1), 'Helvetica-Bold'), ('TEXTCOLOR', (0,1), (1,-1), colors.HexColor('#1a1a2e')), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), # highlight step 11 ('BACKGROUND', (0,10), (-1,10), colors.HexColor('#fff3cd')), ('FONTNAME', (0,10), (-1,10), 'Helvetica-Bold'), ])) story.append(t) story.append(Spacer(1, 4)) story.append(Paragraph("โ GOLDEN RULE: Look at the PATIENT before the paper. Never let the automated report overrule your eyes.", pearl_style)) # โโ SECTION 2: THE PAPER โโ story.append(Spacer(1, 4)) story.append(section_header("ECG PAPER & SQUARES", '#0f3460')) story.append(Spacer(1, 4)) paper_data = [ ["Square", "Size", "Time (horizontal)", "Voltage (vertical)"], ["Small square", "1 mm", "0.04 s", "0.1 mV"], ["Large square", "5 mm (5 small)", "0.20 s", "0.5 mV"], ["5 large squares", "25 mm", "1 second", "โ"], ] t2 = Table(paper_data, colWidths=[45*mm, 40*mm, 50*mm, 45*mm]) t2.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0f3460')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f4fd'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ])) story.append(t2) story.append(Spacer(1,3)) # Waves table waves_data = [ ["Wave / Interval", "Represents", "Normal Value"], ["P wave", "Atrial depolarisation", "< 0.12 s, < 2.5 mm tall"], ["PR interval", "Atrial depol. + AV nodal delay", "0.12 โ 0.20 s"], ["QRS complex", "Ventricular depolarisation", "< 0.12 s (narrow)"], ["ST segment", "Early repolarisation plateau", "Isoelectric (flat)"], ["T wave", "Ventricular repolarisation", "Upright in most leads"], ["QT interval", "Total ventricular activity", "QTc < 440ms (men), < 460ms (women)"], ] t3 = Table(waves_data, colWidths=[45*mm, 75*mm, 60*mm]) t3.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0f3460')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f4fd'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ])) story.append(t3) # โโ SECTION 3: RATE โโ story.append(Spacer(1, 4)) story.append(section_header("RATE CALCULATION", '#1a6b3a')) story.append(Spacer(1, 4)) # Two columns side by side rate_left = [ [Paragraph("<b>300 RULE</b> (Regular rhythm)", ParagraphStyle('rh', fontSize=9, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a6b3a')))], [Paragraph("Divide 300 by the number of large squares between two R waves:", body_style)], [Table([ ["R-R large squares", "1", "2", "3", "4", "5", "6"], ["Rate (bpm)", "300", "150", "100", "75", "60", "50"], ], colWidths=[28*mm,10*mm,10*mm,10*mm,10*mm,10*mm,10*mm], style=TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#c8e6c9')), ('FONTNAME', (0,0), (-1,-1), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8), ('GRID', (0,0), (-1,-1), 0.5, colors.grey), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ]))], ] rate_right = [ [Paragraph("<b>6-SECOND RULE</b> (Irregular rhythm)", ParagraphStyle('rh2', fontSize=9, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a6b3a')))], [Paragraph("Count QRS complexes in 6-second strip (30 large squares) and multiply by 10.", body_style)], [Paragraph("โ Regular tachycardia at EXACTLY 150 bpm โ Think <b>Atrial Flutter 2:1</b> first! Flutter waves hide in T waves.", pearl_style)], ] rate_table_l = Table(rate_left, colWidths=[88*mm]) rate_table_r = Table(rate_right, colWidths=[88*mm]) rate_table_l.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('TOPPADDING',(0,0),(-1,-1),2)])) rate_table_r.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('TOPPADDING',(0,0),(-1,-1),2)])) combined = Table([[rate_table_l, rate_table_r]], colWidths=[90*mm, 90*mm]) combined.setStyle(TableStyle([ ('VALIGN',(0,0),(-1,-1),'TOP'), ('LINEAFTER',(0,0),(0,-1), 1, colors.HexColor('#cccccc')), ('LEFTPADDING',(0,0),(-1,-1),4), ('RIGHTPADDING',(0,0),(-1,-1),4), ])) story.append(combined) # โโ SECTION 4: AXIS โโ story.append(Spacer(1, 4)) story.append(section_header("AXIS โ Quick 2-Lead Method (Lead I + aVF)", '#6a0572')) story.append(Spacer(1, 4)) axis_data = [ ["Lead I", "aVF", "Axis", "Common Causes"], ["+ (upright)", "+ (upright)", "NORMAL (-30ยฐ to +90ยฐ)", "โ"], ["+ (upright)", "- (inverted)", "LEFT AXIS DEVIATION", "LAHB, LVH, Inferior MI, WPW"], ["- (inverted)", "+ (upright)", "RIGHT AXIS DEVIATION", "RVH, PE, Pulm. HTN, Lateral MI, WPW"], ["- (inverted)", "- (inverted)", "NORTHWEST / EXTREME", "VT, Hyperkalaemia, Pacemaker"], ] t4 = Table(axis_data, colWidths=[28*mm, 28*mm, 55*mm, 69*mm]) t4.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#6a0572')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('ALIGN', (0,0), (1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('FONTNAME', (0,2), (2,2), 'Helvetica-Bold'), ('TEXTCOLOR', (0,2), (2,2), colors.HexColor('#b71c1c')), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(t4) # โโ SECTION 5: 12 LEADS TERRITORIES โโ story.append(Spacer(1, 4)) story.append(section_header("12-LEAD TERRITORIES", '#b5451b')) story.append(Spacer(1, 4)) leads_data = [ ["Territory", "Leads", "Usual Artery", "Notes"], ["Inferior", "II, III, aVF", "RCA (or LCx)", "Check for reciprocal changes in I, aVL"], ["Lateral", "I, aVL, V5, V6", "LCx / Diagonal", "โ"], ["Anterior / Septal", "V1 โ V4", "LAD", "Most common STEMI territory"], ["Posterior", "V7-V9 (mirror in V1-V3)", "RCA / LCx", "Tall R + ST depression in V1-V3 = posterior MI"], ["Right ventricle", "V3R, V4R", "Proximal RCA", "Do right-sided leads if inferior MI seen"], ] t5 = Table(leads_data, colWidths=[32*mm, 45*mm, 38*mm, 65*mm]) t5.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#b5451b')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fce8e6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(t5) story.append(Spacer(1,3)) story.append(Paragraph("โ aVR is the 'lonely lead' โ normally mostly inverted. ST elevation in aVR + widespread ST depression = Left main / proximal LAD occlusion (most ominous pattern).", pearl_style)) # โโ SECTION 6: KEY RHYTHMS โโ story.append(Spacer(1, 4)) story.append(section_header("KEY RHYTHMS AT A GLANCE", '#004d7a')) story.append(Spacer(1, 4)) rhythm_data = [ ["Rhythm", "Rate", "Regular?", "P Waves", "QRS", "Clue"], ["Sinus rhythm", "60-100", "Yes", "Upright in II, before every QRS", "Narrow", "Normal"], ["Sinus tachycardia", ">100", "Yes", "Present, upright", "Narrow", "Fever, pain, PE, anaemia"], ["Atrial flutter", "~150 (2:1)", "Yes", "Sawtooth 300/min", "Narrow", "Rate exactly 150 โ flutter until proven otherwise"], ["Atrial fibrillation", "Variable", "NO โ irregularly irregular", "None โ chaotic baseline", "Narrow", "Completely irregular, no P waves"], ["AVNRT", "150-250", "Yes", "Hidden in/near QRS", "Narrow", "Most common SVT; abrupt onset/offset"], ["VT", ">100", "Usually", "Dissociated from QRS", "BROAD", "BROAD complex = VT until proven otherwise!"], ] t6 = Table(rhythm_data, colWidths=[30*mm, 16*mm, 16*mm, 38*mm, 18*mm, 62*mm]) t6.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#004d7a')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e3f2fd'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ('LEFTPADDING', (0,0), (-1,-1), 4), # Highlight VT row in red ('BACKGROUND', (0,6), (-1,6), colors.HexColor('#ffebee')), ('FONTNAME', (0,6), (-1,6), 'Helvetica-Bold'), ('TEXTCOLOR', (4,6), (4,6), colors.HexColor('#b71c1c')), ])) story.append(t6) # โโ FOOTER โโ story.append(Spacer(1, 6)) story.append(HRFlowable(width=W, thickness=1, color=colors.HexColor('#e94560'))) story.append(Spacer(1, 3)) story.append(Paragraph("Based on: A Handbook of ECG by Dr. Sarbagya | Generated July 2026 | For educational use only", ParagraphStyle('footer', fontSize=7.5, fontName='Helvetica-Oblique', textColor=colors.grey, alignment=TA_CENTER))) doc.build(story) print("PDF generated successfully:", output_path) EOF
ECG Cheat Sheet
PDF Document ยท PDF
| Section | Contents |
|---|---|
| ๐ 11-Step System | Full table with every step and key question to ask |
| ๐ ECG Paper & Squares | Small/large square values + all wave normals |
| โฑ Rate Calculation | 300 rule table + 6-second rule + "exactly 150" pearl |
| ๐งญ Axis | 2-lead method table + causes of each deviation |
| ๐บ 12-Lead Territories | All territories, arteries, and clinical notes |
| ๐ Key Rhythms | 6 core rhythms with rate, P waves, QRS, and clinical clues |
Svt because it's naoorw complex as you said and no obvious p wave Broad is vt until proven otherwise Avnrt Broad complex
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
Key distinction: "Irregularly irregular" means there is NO pattern to the irregularity at all. Not just "a bit irregular" - completely unpredictable R-R intervals.
| Feature | AF | Flutter |
|---|---|---|
| Baseline | Chaotic, irregular | Regular sawtooth |
| P waves | None | Flutter waves at 300/min |
| QRS rhythm | Irregularly irregular | Regular |
| Rate | Variable | Usually ~150 |
| Risk | Stroke (clot in LAA) | Lower stroke risk but still significant |
A atrial fibrillation atrial fluttegive carotid massage or adenosine 6 second rule duh
| Q | Topic | Result |
|---|---|---|
| Q1 | QRS width | โ Good |
| Q2 | 11-step / machine trust | โ Good |
| Q3 | Rate calculation | โ Perfect |
| Q4 | Axis | โ Perfect |
| Q5 | SVT vs VT | โ Perfect |
| Q6 | AF vs Flutter | โ Perfect |
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
Any broad-complex tachycardia (QRS > 0.12s) = VENTRICULAR TACHYCARDIA until proven otherwise.
| Feature | What it means |
|---|---|
| AV dissociation | P waves and QRS march independently - pathognomonic of VT |
| Fusion beats | A sinus beat and VT beat merge - produces intermediate QRS shape |
| Capture beats | A sinus impulse briefly "captures" the ventricle - produces a narrow QRS in the middle of a broad rhythm |
| QRS > 0.14s | Very wide = almost certainly VT |
| Concordance | All chest leads (V1-V6) point the same direction (all up or all down) |
| Northwest axis | Extreme axis deviation = strongly VT |
| Feature | Favours VT | Favours SVT + aberrancy |
|---|---|---|
| QRS width | > 0.14s | 0.12-0.14s |
| AV dissociation | โ Present | Absent |
| Capture/fusion beats | โ Present | Absent |
| Previous MI history | โ Yes | Less likely |
| Response to adenosine | No change | Often terminates |
| Axis | Northwest | Normal/LAD |
If you're not sure - treat as VT. Giving adenosine or verapamil to a real VT can cause haemodynamic collapse. But treating SVT as VT (with amiodarone or DC cardioversion) is safe.
Captire beats Confirm that is it vt sure as fuck Don't give adenosine or verapamil because causes collapse
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
| Feature | What it looks like | Why it happens |
|---|---|---|
| Short PR interval | < 0.12s | Bypass tract conducts faster than AV node - ventricles activate early |
| Delta wave | Slurred upstroke at the START of QRS | Early, slow ventricular pre-excitation via the bypass tract |
| Wide QRS | > 0.12s | QRS = delta wave + normal conduction fused together |
Memory trick: Delta wave, Wide QRS, Short PR = DWS = "Down With Slurring"
Lest go up to lesson 10 and then we will go to revisin question ask me about it olay
P----QRS P----QRS P----QRS
(long gap) (long gap) (long gap)
P P P P P P P โ atria doing their own thing at ~80/min
QRS QRS QRS โ ventricles doing their own thing at ~35/min
| Block | PR interval | Dropped beats? | Danger | Treatment |
|---|---|---|---|---|
| 1st degree | Fixed, long (>0.20s) | Never | Low | None |
| 2nd degree Mobitz I | Gets longer then drops | Yes, predictable | Low-moderate | Monitor |
| 2nd degree Mobitz II | Fixed then sudden drop | Yes, unpredictable | HIGH | Pace! |
| 3rd degree (complete) | No relationship | All dissociated | VERY HIGH | Pace! |
Key pearl: Mobitz II and complete heart block = call the pacing team. Do NOT wait.
Correct mnemonic: RBBB = WiLLiaM, LBBB = MaRRoW
- WiLLiaM: W in V1, M in V5 = LBBB... wait let me be precise:
| V1 shape | V5/V6 shape | Block | |
|---|---|---|---|
| WiLLiam | W shape | M shape | LBBB |
| MaRRow | M shape (RSR') | W shape (broad S) | RBBB |
| Sgarbossa Criterion | Points | Weight |
|---|---|---|
| ST elevation โฅ 1mm concordant with QRS direction | 5 | Strongest |
| ST depression โฅ 1mm in V1, V2, or V3 | 3 | Moderate |
| ST elevation โฅ 5mm discordant with QRS | 2 | Least specific |
| Score โฅ 3 = likely MI |
Discordant ST changes are normal in LBBB. It's the concordant changes (ST elevation in same direction as QRS) that are the red flag.
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
Wow syndrome Delta wave wide qrs and short pr Don't give a nodal blocking drugs like adenosine Do give procainamide or DC cardioversion
Give lesson 9 and 10 first
PR: 0.18 โ 0.22 โ 0.28 โ P with no QRS โ 0.18 โ 0.22...
PR: 0.18 โ 0.18 โ 0.18 โ P with NO QRS (no warning!) โ 0.18...
P . P . P . P . P โ atria at ~75/min
. QRS . . . QRS . . . QRS . โ ventricles at ~35/min (own escape)
| Block | PR interval | Dropped beats | Risk | Action |
|---|---|---|---|---|
| 1st degree | Long but fixed | Never | Low | None needed |
| 2nd Mobitz I | Progressively longer, resets | Yes, predictable | Low-moderate | Monitor |
| 2nd Mobitz II | Fixed, then sudden drop | Yes, unpredictable | HIGH | Pacing |
| 3rd degree | No relationship (AV dissociation) | All dissociated | CRITICAL | Pacing NOW |
Key pearl: Mobitz I is the kind one. Mobitz II is the traitor - it gives no warning before dropping into complete heart block.
V1 V5/V6
WiLL W shape โ M shape = LBBB (Left)
MaRR M shape โ W shape = RBBB (Right)
| Criterion | Significance |
|---|---|
| ST elevation โฅ 1mm concordant with QRS (same direction) | Strongest - almost always MI |
| ST depression โฅ 1mm in V1, V2, or V3 | Moderate evidence |
| ST elevation โฅ 5mm discordant (opposite to QRS) | Least specific |
The key word is CONCORDANT. In LBBB, discordant ST changes are expected and normal. Concordant ST elevation (ST goes UP when QRS goes UP) is the red flag - it means the heart muscle is fighting against the block to show you it's infarcting.
One small square 0.04 s Not normal it should be less than 0.12 Rt axis deviation 60 bpm A fib Mobitz type 1 Mobits type 2 Type 3 hb Sgarbossa criteria
| Lead I | aVF | Axis |
|---|---|---|
| โ | โ | Normal |
| โ | โ | Left axis deviation |
| โ | โ | Right axis deviation |
| โ | โ | Northwest (extreme) |
Rad Dangerous risk of complete hb Treat as stemi
Mobitz I = "I give warnings" โ PR lengthens โ THEN drops โ BENIGN
Mobitz II = "II gives nothing" โ fixed PR โ sudden drop โ DANGEROUS
Mobits 1 begins like type 1 Type 2 dangerous can cause complete hb
| Q | Topic | Result |
|---|---|---|
| R1 | Small square = 0.04s | โ Perfect |
| R2 | Wide QRS = abnormal | โ Perfect |
| R3 | Axis (Northwest trap) | โ Fixed after correction |
| R4 | Rate = 60 bpm | โ Perfect |
| R5 | AF + 6-second rule | โ Good (needed prompting on why) |
| R6 | WPW syndrome | โ Perfect |
| R7 | Mobitz I = benign | โ Fixed after drilling |
| R8 | Mobitz II = dangerous, pace | โ Fixed |
| R9 | AV dissociation = VT | โ Good |
| R10 | LBBB + chest pain = cath lab + Sgarbossa | โ Perfect |
~/ecg-course/progress.md
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ecg-course/progress.md'
Take a break and resume later
progress
MD File ยท MD
ECG Cheat Sheet
PDF Document ยท PDF
"Continue my ECG course. My progress file is at /home/daytona/workspace/ecg-course/progress.md"
Let's fucking gooo
| Location | ST elevation required |
|---|---|
| V2-V3 (men โฅ40) | โฅ 2mm |
| V2-V3 (men <40) | โฅ 2.5mm |
| V2-V3 (women) | โฅ 1.5mm |
| All other leads | โฅ 1mm |
| Territory | Leads with ST elevation | Artery occluded | Reciprocal changes (mirror) |
|---|---|---|---|
| Anterior | V1-V4 | LAD | ST depression in II, III, aVF |
| Inferior | II, III, aVF | RCA (85%) or LCx | ST depression in I, aVL |
| Lateral | I, aVL, V5, V6 | LCx / diagonal | ST depression in II, III, aVF |
| Posterior | None directly! (mirror in V1-V3) | RCA / LCx | Tall R + ST depression in V1-V3 |
Why it matters: Sometimes the ST elevation is subtle, but the reciprocal depression is screaming at you. Always look for the mirror. If you see ST depression in II/III/aVF โ look hard at I/aVL for lateral MI. If you see ST depression in I/aVL โ look at inferior leads.
Minutes: Hyperacute T waves (tall, peaked - first sign, easy to miss)
Hours: ST elevation appears
Hours-days: Q waves develop (dead tissue, permanent)
Days: ST normalises, T waves invert
Weeks: T waves may normalise; Q waves persist forever
Hyperacute T waves are the very first sign - tall, broad, asymmetric. They appear before ST elevation. Most machines miss them. YOU should not.
Let's go first about calculation of axis
aVR (-150ยฐ) aVL (-30ยฐ)
\ /
-180ยฐ โโโโ+โโโโโโโโ+โโโโ 0ยฐ (Lead I)
/ \
III (+120ยฐ) II (+60ยฐ)
|
aVF (+90ยฐ)
| Lead I | aVF | Axis | Degrees |
|---|---|---|---|
| โ Positive | โ Positive | Normal | -30ยฐ to +90ยฐ |
| โ Positive | โ Negative | Left Axis Deviation (LAD) | -30ยฐ to -90ยฐ |
| โ Negative | โ Positive | Right Axis Deviation (RAD) | +90ยฐ to +180ยฐ |
| โ Negative | โ Negative | Northwest (Extreme) | -90ยฐ to ยฑ180ยฐ |
| Lead | Angle | Perpendicular lead |
|---|---|---|
| Lead I | 0ยฐ | aVF (90ยฐ) |
| Lead II | +60ยฐ | aVL (-30ยฐ) |
| Lead III | +120ยฐ | aVR (-150ยฐ) |
| aVF | +90ยฐ | Lead I (0ยฐ) |
| aVL | -30ยฐ | Lead II (+60ยฐ) |
| aVR | -150ยฐ | Lead III (+120ยฐ) |
Lead I = positive (tall R), aVF = negative โ Left axis deviation confirmed Now look for the most isoelectric lead... Lead II looks flat/biphasic โ axis is perpendicular to Lead II Lead II is at +60ยฐ โ perpendicular = -30ยฐ So axis = approximately -30ยฐ (borderline left axis)
Quick rule: If Lead I is up, aVF is down - check Lead II:
- Lead II upright โ Normal (just at the left edge)
- Lead II flat โ exactly -30ยฐ (borderline)
- Lead II negative โ True LAD (beyond -30ยฐ)
| Lead I | aVF | Lead II | Final Axis |
|---|---|---|---|
| โ | โ | โ | Normal |
| โ | โ | โ | Normal (borderline left) |
| โ | โ | flat | Exactly -30ยฐ |
| โ | โ | โ | True LAD |
| โ | โ | โ or โ | RAD |
| โ | โ | any | Northwest (extreme) |
| Deviation | Top Causes |
|---|---|
| LAD | Left anterior hemiblock (LAHB), LVH, inferior MI, WPW (left-sided pathway), LBBB |
| RAD | RVH, pulmonary hypertension, PE, lateral MI, LPHB, WPW (right-sided), normal in children/tall thin people |
| Northwest | VT, severe hyperkalaemia, pacemaker rhythm, dextrocardia |
Help
LEAD I
โโโโโ+โโโโโ
|
| aVF
โ
| Lead | QRS direction | What it means |
|---|---|---|
| Lead I | โ Positive (upright) | Arrow pointing LEFT โ |
| aVF | โ Negative (inverted) | Arrow pointing AWAY from down = pointing UP |
| Lead II | โ Negative (inverted) | Arrow pointing away from +60ยฐ |
| Lead I | aVF | Answer |
|---|---|---|
| โ | โ | Normal |
| โ | โ | ??? |
| โ | โ | RAD |
| โ | โ | Northwest |
Lad
When Lead I is โ and aVF is โ (LAD zone), check Lead II to see how far left the axis has gone:
Lead II POSITIVE โ Normal (just borderline left)
Lead II FLAT โ Exactly -30ยฐ (the boundary)
Lead II NEGATIVE โ TRUE Left Axis Deviation (gone past -30ยฐ)
True lad
LAD is caused by: Left anterior hemiblock, LVH, inferior MI, WPW, LBBB
I don't understand the tie breaker lead 2
-90ยฐ
|
-180ยฐ โโโโโโโ+โโโโโโโ 0ยฐ (Lead I)
|
+90ยฐ (aVF)
The LAD zone is this slice:
-30ยฐ to -90ยฐ
โ
This boundary at -30ยฐ is exactly where Lead II sits!
NORMAL AXIS TRUE LAD
โโโโโโโโโโโโโ|-30ยฐ-|โโโโโโโโโโโโโ
โ
THIS IS WHERE
LEAD II SITS
If axis is to the RIGHT of -30ยฐ โ Lead II is POSITIVE โ Normal
If axis is exactly AT -30ยฐ โ Lead II is FLAT โ Borderline
If axis is to the LEFT of -30ยฐ โ Lead II is NEGATIVE โ True LAD
"If Lead II is still positive = still normal. If Lead II goes negative = true LAD."
Normal
Lead I โ + aVF โ โ NORMAL
Lead I โ + aVF โ + Lead II โ โ NORMAL (borderline left)
Lead I โ + aVF โ + Lead II โ โ TRUE LAD
Lead I โ + aVF โ โ RAD
Lead I โ + aVF โ โ NORTHWEST
Can you give me ECG paper too to solve it
python3 << 'EOF' import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as patches import numpy as np fig, axes = plt.subplots(4, 1, figsize=(16, 10)) fig.patch.set_facecolor('#fffbe6') # ECG paper grid function def draw_grid(ax, duration=10, amplitude=4): ax.set_xlim(0, duration) ax.set_ylim(-amplitude/2, amplitude/2) ax.set_facecolor('#fffbe6') # Small squares (0.04s x 0.1mV) = 1mm for x in np.arange(0, duration, 0.04): ax.axvline(x, color='#ffb3b3', linewidth=0.3, zorder=0) for y in np.arange(-amplitude/2, amplitude/2, 0.1): ax.axhline(y, color='#ffb3b3', linewidth=0.3, zorder=0) # Large squares (0.2s x 0.5mV) for x in np.arange(0, duration, 0.2): ax.axvline(x, color='#ff6b6b', linewidth=0.7, zorder=0) for y in np.arange(-amplitude/2, amplitude/2, 0.5): ax.axhline(y, color='#ff6b6b', linewidth=0.7, zorder=0) ax.axhline(0, color='#cc0000', linewidth=0.8, zorder=0) # Generate a single ECG beat def make_beat(t_start, rate=75, p_amp=0.2, qrs_amp=1.0, t_amp=0.3, pr=0.16, qrs_w=0.08, st_len=0.12, t_w=0.16, q_depth=0.15, axis_flip=False): """Returns t array and y array for one beat""" RR = 60/rate t = np.linspace(t_start, t_start + RR, 1000) y = np.zeros(len(t)) rel = t - t_start # relative time within beat # P wave (gaussian) p_center = 0.08 p_sigma = 0.03 p_wave = p_amp * np.exp(-((rel - p_center)**2)/(2*p_sigma**2)) # Q wave q_center = p_center + pr q_sigma = 0.012 q_wave = -q_depth * np.exp(-((rel - q_center)**2)/(2*q_sigma**2)) # R wave r_center = q_center + 0.025 r_sigma = 0.018 r_wave = qrs_amp * np.exp(-((rel - r_center)**2)/(2*r_sigma**2)) # S wave s_center = r_center + 0.025 s_sigma = 0.014 s_wave = -0.25 * np.exp(-((rel - s_center)**2)/(2*s_sigma**2)) # ST segment + T wave t_center = r_center + qrs_w/2 + st_len + t_w/2 t_sigma = 0.04 t_wave = t_amp * np.exp(-((rel - t_center)**2)/(2*t_sigma**2)) y = p_wave + q_wave + r_wave + s_wave + t_wave if axis_flip: y = -y return t, y # โโ LEAD I: Normal - positive in Lead I โโ ax = axes[0] draw_grid(ax, duration=10, amplitude=3) t_all = [] y_all = [] for i in range(12): t, y = make_beat(t_start=0.2 + i*(60/75), rate=75, p_amp=0.2, qrs_amp=1.2, t_amp=0.35, q_depth=0.1, axis_flip=False) t_all.extend(t) y_all.extend(y) ax.plot(t_all, y_all, 'k-', linewidth=1.2, zorder=5) ax.set_ylabel('Lead I', fontsize=11, fontweight='bold', color='#1a1a2e') ax.set_yticks([]) ax.set_xticks([]) ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bottom'].set_visible(False) ax.spines['left'].set_visible(False) # Calibration pulse ax.plot([0.02, 0.02, 0.12, 0.12, 0.18], [-0.5, 0.5, 0.5, -0.5, -0.5], 'k-', linewidth=1.5) # โโ aVF: Negative (inverted) โโ ax = axes[1] draw_grid(ax, duration=10, amplitude=3) t_all = [] y_all = [] for i in range(12): t, y = make_beat(t_start=0.2 + i*(60/75), rate=75, p_amp=0.15, qrs_amp=1.0, t_amp=0.25, q_depth=0.08, axis_flip=True) t_all.extend(t) y_all.extend(y) ax.plot(t_all, y_all, 'k-', linewidth=1.2, zorder=5) ax.set_ylabel('aVF', fontsize=11, fontweight='bold', color='#1a1a2e') ax.set_yticks([]) ax.set_xticks([]) ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bottom'].set_visible(False) ax.spines['left'].set_visible(False) ax.plot([0.02, 0.02, 0.12, 0.12, 0.18], [-0.5, 0.5, 0.5, -0.5, -0.5], 'k-', linewidth=1.5) # โโ Lead II: Negative (inverted - true LAD) โโ ax = axes[2] draw_grid(ax, duration=10, amplitude=3) t_all = [] y_all = [] for i in range(12): t, y = make_beat(t_start=0.2 + i*(60/75), rate=75, p_amp=0.12, qrs_amp=0.9, t_amp=0.22, q_depth=0.06, axis_flip=True) t_all.extend(t) y_all.extend(y) ax.plot(t_all, y_all, 'k-', linewidth=1.2, zorder=5) ax.set_ylabel('Lead II', fontsize=11, fontweight='bold', color='#1a1a2e') ax.set_yticks([]) ax.set_xticks([]) ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bottom'].set_visible(False) ax.spines['left'].set_visible(False) ax.plot([0.02, 0.02, 0.12, 0.12, 0.18], [-0.5, 0.5, 0.5, -0.5, -0.5], 'k-', linewidth=1.5) # โโ aVR: reference โโ ax = axes[3] draw_grid(ax, duration=10, amplitude=3) t_all = [] y_all = [] for i in range(12): t, y = make_beat(t_start=0.2 + i*(60/75), rate=75, p_amp=0.1, qrs_amp=0.7, t_amp=0.18, q_depth=0.05, axis_flip=True) t_all.extend(t) y_all.extend(y) ax.plot(t_all, y_all, 'k-', linewidth=1.2, zorder=5) ax.set_ylabel('aVR', fontsize=11, fontweight='bold', color='#1a1a2e') ax.set_yticks([]) ax.set_xlabel('Time โ (each large square = 0.20s | each small square = 0.04s | 10mm = 1mV)', fontsize=9, color='#555') ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bottom'].set_visible(False) ax.spines['left'].set_visible(False) ax.plot([0.02, 0.02, 0.12, 0.12, 0.18], [-0.5, 0.5, 0.5, -0.5, -0.5], 'k-', linewidth=1.5) plt.suptitle('PRACTICE ECG STRIP โ Axis Analysis\nAnalyse Lead I, aVF and Lead II to determine the axis', fontsize=13, fontweight='bold', color='#1a1a2e', y=1.01) plt.tight_layout(pad=0.5) plt.savefig('/home/daytona/workspace/ecg-course/practice_ecg_axis.png', dpi=150, bbox_inches='tight', facecolor='#fffbe6') print("ECG image saved!") EOF

| Lead | QRS direction | Your answer |
|---|---|---|
| Lead I | Upright or inverted? | ? |
| aVF | Upright or inverted? | ? |
| Lead II | Upright or inverted? | ? |
Image didn't load
python3 << 'EOF' import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np fig, axes = plt.subplots(3, 1, figsize=(16, 9)) fig.patch.set_facecolor('#fffbe6') def draw_grid(ax, duration=10, amplitude=3): ax.set_xlim(0, duration) ax.set_ylim(-amplitude/2, amplitude/2) ax.set_facecolor('#fffbe6') for x in np.arange(0, duration+0.04, 0.04): ax.axvline(x, color='#ffcccc', linewidth=0.3, zorder=0) for y in np.arange(-amplitude/2, amplitude/2+0.1, 0.1): ax.axhline(y, color='#ffcccc', linewidth=0.3, zorder=0) for x in np.arange(0, duration+0.2, 0.2): ax.axvline(x, color='#ff8888', linewidth=0.8, zorder=1) for y in np.arange(-amplitude/2, amplitude/2+0.5, 0.5): ax.axhline(y, color='#ff8888', linewidth=0.8, zorder=1) ax.axhline(0, color='#bb0000', linewidth=1.0, zorder=1) def ecg_wave(t_array, t0, rate=75, p=0.20, qrs=1.2, t_w=0.35, flip=False): RR = 60/rate y = np.zeros(len(t_array)) r = t_array - t0 mask = (r >= 0) & (r < RR) rm = r[mask] ym = np.zeros(len(rm)) # P wave ym += p * np.exp(-((rm - 0.08)**2)/(2*0.025**2)) # Q ym -= 0.15 * np.exp(-((rm - 0.175)**2)/(2*0.010**2)) # R ym += qrs * np.exp(-((rm - 0.200)**2)/(2*0.015**2)) # S ym -= 0.20 * np.exp(-((rm - 0.225)**2)/(2*0.012**2)) # T ym += t_w * np.exp(-((rm - 0.360)**2)/(2*0.040**2)) if flip: ym = -ym y[mask] = ym return y t = np.linspace(0, 10, 5000) rate = 75 beats = [0.3 + i*(60/rate) for i in range(11)] lead_configs = [ ("Lead I", False, "#1a1a2e"), ("aVF", True, "#1a1a2e"), ("Lead II", True, "#1a1a2e"), ] for idx, (label, flip, color) in enumerate(lead_configs): ax = axes[idx] draw_grid(ax) y = np.zeros(len(t)) for b in beats: y += ecg_wave(t, b, rate=rate, flip=flip) ax.plot(t, y, color='black', linewidth=1.4, zorder=5) # Cal pulse ax.plot([0.02,0.02,0.14,0.14,0.20],[-0.5,0.5,0.5,-0.5,-0.5],'k-',linewidth=2) ax.set_yticks([]) ax.set_xticks(np.arange(0,11,1)) ax.set_xticklabels([]) ax.set_ylabel(label, fontsize=13, fontweight='bold', rotation=0, labelpad=45, va='center', color=color) for spine in ax.spines.values(): spine.set_visible(False) axes[2].set_xlabel('โ Each large square = 0.20 s | Each small square = 0.04 s | Cal pulse = 1 mV โ', fontsize=9, color='#555555') fig.suptitle('PRACTICE ECG โ Determine the Cardiac Axis\nLook at each lead: is the QRS positive (upright) or negative (inverted)?', fontsize=13, fontweight='bold', color='#1a1a2e') plt.tight_layout(pad=1.2) out = '/home/daytona/workspace/ecg-course/practice_ecg_axis.png' plt.savefig(out, dpi=160, bbox_inches='tight', facecolor='#fffbe6') print("Saved:", out) EOF
practice ecg axis
Image ยท PNG
| Lead I | aVF | Lead II | Axis = ? |
|---|---|---|---|
| โ UP | โ DOWN | โ DOWN | ??? |
True lad
| # | Lead I | aVF | Lead II | Axis = ? |
|---|---|---|---|---|
| 1 | โ | โ | โ | ? |
| 2 | โ | โ | any | ? |
| 3 | โ | โ | โ | ? |
Next one
| # | Lead I | aVF | Lead II | Your answer? |
|---|---|---|---|---|
| 1 | โ | โ | โ | ? |
| 2 | โ | โ | any | ? |
| 3 | โ | โ | โ | ? |
Normal Rad Normal
~/ecg-course/progress.md
Error: File '/home/daytona/workspace/ecg-course/progress.md' not found
~/ecg-course/progress.md
# ๐ ECG Course Progress Tracker **Book:** A Handbook of ECG by Dr. Sarbagya (207 pages) **File:** /home/daytona/workspace/attachments/32e66194-d8be-4297-967a-8d8f371e3c2a/A_Handbook_of_ECG_by_Dr_Sarbagya_61791aaa-68ab-4549-a6b5-e5eebfc71f6f.pdf --- ## ๐ CURRENT POSITION - **Last completed:** Axis deep dive + all scenarios drilled โ - **Currently pending:** Student needs to answer Question 11 (STEMI) - **Next lesson:** Lesson 12 - STEMI Equivalents (Chapter 12) --- ## โ LESSONS COMPLETED ### PART I - FOUNDATIONS - [x] Ch.1 - ECG paper, squares, waves, 12-lead territories - [x] Ch.2 - The 11-step system - [x] Ch.3 - Rate (300 rule + 6-second rule) - [x] Ch.4 - Axis and hemiblocks (including deep dive with Lead II tiebreaker) ### PART II - RHYTHM - [x] Ch.5 - Supraventricular rhythms (SVT family, narrow = SVT rule) - [x] Ch.6 - AF, Flutter and the irregular pulse - [x] Ch.7 - Broad-complex tachycardias / VT (capture beats, AV dissociation) - [x] Ch.8 - Pre-excitation and WPW (delta wave, never give AV nodal blockers) ### PART III - CONDUCTION - [x] Ch.9 - AV blocks (1st degree, Mobitz I, Mobitz II, complete heart block) - [x] Ch.10 - Bundle branch block (WiLLiaM MaRRoW, LBBB + chest pain = cath lab, Sgarbossa) ### PART IV - ISCHAEMIA (IN PROGRESS) - [x] Ch.11 - STEMI, territories, reciprocal mirror (taught, Q11 pending answer) - [ ] Ch.12 - STEMI equivalents (Wellens, De Winter, posterior, aVR) - [ ] Ch.13 - T-wave inversion differential --- ## ๐ QUIZ SCORES | Question | Topic | Result | |---|---|---| | Q1 | QRS width calculation | โ Good | | Q2 | 11-step / machine trust | โ Good | | Q3 | Rate calculation | โ Perfect | | Q4 | Axis (basic) | โ Perfect | | Q5 | SVT vs VT | โ Perfect | | Q6 | AF vs Flutter | โ Perfect | | Q7 | VT / capture beats | โ Perfect | | Q8 | WPW | โ Perfect | | Revision R1-R10 | Lessons 1-10 | 8.5/10 | | Axis deep dive | Lead II tiebreaker scenarios | โ 3/3 Perfect | | Q11 | STEMI territories | PENDING | --- ## โ ๏ธ WEAK AREAS (previously drilled, now resolved) - Axis: Northwest vs RAD distinction โ FIXED - Mobitz I (benign) vs Mobitz II (dangerous) โ FIXED - Lead II tiebreaker for true LAD โ FIXED โ --- ## โถ๏ธ HOW TO RESUME In a new conversation, say: > "Continue my ECG course. My progress file is at /home/daytona/workspace/ecg-course/progress.md. The ECG book is at /home/daytona/workspace/attachments/32e66194-d8be-4297-967a-8d8f371e3c2a/A_Handbook_of_ECG_by_Dr_Sarbagya_61791aaa-68ab-4549-a6b5-e5eebfc71f6f.pdf" *Last updated: July 15, 2026*
mkdir -p /tmp/workspace/ecg-course && cat > /tmp/workspace/ecg-course/progress.md << 'PROGRESSEOF' # ECG Course Progress Tracker Book: A Handbook of ECG by Dr. Sarbagya (207 pages) ## CURRENT POSITION - Last completed: Axis deep dive + all scenarios drilled - Currently pending: Q11 STEMI (taught, awaiting answer) - Next lesson: Ch.12 STEMI Equivalents ## COMPLETED - Ch.1 ECG paper, waves, 12-lead territories - Ch.2 11-step system - Ch.3 Rate (300 rule + 6-second rule) - Ch.4 Axis + hemiblocks + Lead II tiebreaker (deep dive) - Ch.5 SVT rhythms - Ch.6 AF vs Flutter - Ch.7 VT, capture beats, AV dissociation - Ch.8 WPW - delta wave, never give AV nodal blockers - Ch.9 AV blocks (1st, Mobitz I benign, Mobitz II dangerous, complete HB) - Ch.10 BBB (WiLLiaM MaRRoW, LBBB + chest pain = cath lab, Sgarbossa) - Ch.11 STEMI territories taught (Q11 pending) ## SCORES: Revision 8.5/10 | Axis drill 3/3 perfect ## WEAK AREAS: All resolved (axis, Mobitz I vs II) PROGRESSEOF echo "Progress saved to /tmp/workspace/ecg-course/progress.md"
| Leads | Elevation needed |
|---|---|
| V2-V3 (men โฅ40) | โฅ 2mm |
| V2-V3 (women) | โฅ 1.5mm |
| All other leads | โฅ 1mm |
| Territory | ST elevation in... | Artery | Reciprocal depression in... |
|---|---|---|---|
| Anterior | V1-V4 | LAD | II, III, aVF |
| Inferior | II, III, aVF | RCA (85%) | I, aVL |
| Lateral | I, aVL, V5-V6 | LCx | II, III, aVF |
| Posterior | No direct leads! | RCA/LCx | Tall R + ST depression V1-V3 |
Why it matters: Sometimes the ST elevation is subtle but the reciprocal depression is screaming. Always look for the mirror.
Minutes โ Hyperacute T waves (tall, peaked) โ machines miss this!
Hours โ ST elevation appears
Hours-days โ Q waves form (permanent dead tissue)
Days โ ST normalises, T waves invert
Weeks โ Q waves persist forever