Plasma Diagnostic Signals to Turbulence Characteristics
Select a plasma diagnostic technique from the dropdown below to learn how its signals are used to characterize turbulence in plasma physics.
PDF generation failed. Library not loaded.
'; } return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const resultArea = document.getElementById('resultArea'); const diagnosticKey = resultArea.dataset.diagnosticKey; const info = diagnosticInfo[diagnosticKey]; const generationDate = new Date().toLocaleString(); if (!info) { console.error('No diagnostic information found to generate PDF.'); return; } let yOffset = 20; // Title doc.setFontSize(24); doc.setTextColor(44, 62, 80); doc.text("Plasma Diagnostic & Turbulence Characteristics Report", 105, yOffset, { align: 'center' }); yOffset += 20; // Diagnostic Title doc.setFontSize(20); doc.setTextColor(46, 204, 113); /* Green */ doc.text(info.title, 20, yOffset); yOffset += 15; // Principle doc.setFontSize(12); doc.setTextColor(51, 51, 51); doc.text("Principle:", 20, yOffset); yOffset += 7; const principleText = doc.splitTextToSize(info.description, 170); doc.text(principleText, 25, yOffset); yOffset += (principleText.length * 7) + 10; // Adjust yOffset // Characteristics doc.setFontSize(12); doc.setTextColor(51, 51, 51); doc.text("Key Turbulence Characteristics Revealed:", 20, yOffset); yOffset += 7; if (info.characteristics && info.characteristics.length > 0) { info.characteristics.forEach(char => { if (yOffset > 270) { // Check for page break doc.addPage(); yOffset = 20; doc.setFontSize(12); doc.setTextColor(51, 51, 51); doc.text("Key Turbulence Characteristics (cont.):", 20, yOffset); yOffset += 7; } const charText = doc.splitTextToSize(`• ${char}`, 170); doc.text(charText, 25, yOffset); yOffset += (charText.length * 7) + 5; }); } else { doc.text("No specific characteristics listed for this diagnostic.", 25, yOffset); yOffset += 10; } // Footer doc.setFontSize(9); doc.setTextColor(150, 150, 150); doc.text(`Report Generated: ${generationDate}`, 20, doc.internal.pageSize.height - 15); doc.text("Plasma Diagnostics Tool", doc.internal.pageSize.width - 20, doc.internal.pageSize.height - 15, { align: 'right' }); doc.save(`${diagnosticKey}_Turbulence_Characteristics_Report.pdf`); }