<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Discovering Exoplanets with TESS and the Transit Method</title>
<style>
/* Embedded CSS for styling */
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #000; /* Dark background for a space theme */
color: #fff; /* White text for contrast */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
background-image: radial-gradient(circle, #333, #000); /* Subtle starry gradient */
}
header {
text-align: center;
padding: 20px;
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black for header */
width: 100%;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
h1 {
font-size: 2.5em;
color: #aqua; /* Cyan color for a cosmic feel */
text-shadow: 0 0 10px #aqua;
}
.container {
max-width: 800px;
padding: 20px;
background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent container */
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); /* Glowing cyan shadow */
margin: 20px;
}
p, h2 {
line-height: 1.6;
margin-bottom: 20px;
}
h2 {
color: #fff;
border-bottom: 2px solid #aqua;
padding-bottom: 10px;
}
.visualization {
display: flex;
flex-direction: column;
align-items: center;
}
canvas {
background-color: #111; /* Dark canvas background */
border: 1px solid #aqua;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}
.footer {
margin-top: 20px;
font-size: 0.8em;
color: #888;
text-align: center;
}
/* Responsive design */
@media (max-width: 600px) {
h1 {
font-size: 2em;
}
.container {
padding: 10px;
}
}
</style>
</head>
<body>
<header>
<h1>Discovering Exoplanets with TESS and the Transit Method</h1>
</header>
<div class="container">
<h2>What is the Transit Method?</h2>
<p>
The transit method is one of the most successful techniques for discovering exoplanets—planets orbiting stars outside our solar system. It works by monitoring the brightness of a star over time. When a planet passes (or "transits") in front of its star, it causes a slight, temporary dip in the star's brightness. By carefully measuring these dips, scientists can infer the presence of a planet, its size, and even its orbital period.
</p>
<p>
This method is the primary technique used by the Transiting Exoplanet Survey Satellite (TESS), a NASA mission launched in 2018. TESS scans the entire sky to find exoplanets around bright, nearby stars, providing data that helps us understand the diversity of planets in our galaxy.
</p>
<h2>Visualizing a Transit Light Curve</h2>
<p>
Below is a simulated visualization of a light curve based on TESS data. The x-axis represents time, and the y-axis shows the relative brightness (flux) of the star. The dips in the curve indicate when an exoplanet transits the star. This example uses sample data to illustrate how TESS detects these events.
</p>
<div class="visualization">
<canvas id="lightCurveCanvas" width="600" height="400"></canvas>
</div>
<p>
In this graph, you'll see periodic dips, representing multiple transits of the same planet. Real TESS data often involves analyzing thousands of such light curves to confirm exoplanet discoveries.
</p>
<h2>About TESS Data</h2>
<p>
TESS has discovered thousands of exoplanet candidates by observing starlight dips like the one shown. You can explore real TESS data on the <a href="https://tess.mit.edu/" target="_blank" style="color: #aqua; text-decoration: none; border-bottom: 1px dotted #aqua;">TESS website</a> or through NASA's Exoplanet Archive. This visualization is a simplified representation to help you grasp the concept.
</p>
</div>
<div class="footer">
Created with passion for space exploration. Data visualization inspired by TESS mission.
</div>
<script>
// Embedded JavaScript for canvas drawing
// Sample data: Simulated light curve with periodic transits
const data = [
{ time: 0, flux: 1.000 },
{ time: 1, flux: 1.000 },
{ time: 2, flux: 0.995 }, // Start of transit dip
{ time: 3, flux: 0.990 },
{ time: 4, flux: 0.995 }, // End of transit dip
{ time: 5, flux: 1.000 },
{ time: 6, flux: 1.000 },
{ time: 7, flux: 0.995 }, // Another transit dip
{ time: 8, flux: 0.990 },
{ time: 9, flux: 0.995 },
{ time: 10, flux: 1.000 }
// Add more points if needed for smoother curve
];
// Get the canvas and context
const canvas = document.getElementById('lightCurveCanvas');
const ctx = canvas.getContext('2d');
// Set up the graph
const padding = 40; // Space for axes and labels
const maxTime = Math.max(...data.map(d => d.time));
const minFlux = Math.min(...data.map(d => d.flux)) - 0.01; // Small buffer
const maxFlux = Math.max(...data.map(d => d.flux)) + 0.01;
// Draw axes
ctx.beginPath();
ctx.moveTo(padding, padding);
ctx.lineTo(padding, canvas.height - padding);
ctx.lineTo(canvas.width - padding, canvas.height - padding);
ctx.strokeStyle = '#aqua';
ctx.stroke();
// Draw x-axis label
ctx.fillStyle = '#fff';
ctx.font = '14px Arial';
ctx.textAlign = 'center';
ctx.fillText('Time (arbitrary units)', canvas.width / 2, canvas.height - 10);
// Draw y-axis label
ctx.save();
ctx.translate(15, canvas.height / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = 'center';
ctx.fillText('Relative Flux', 0, 0);
ctx.restore();
// Draw data points and line
ctx.beginPath();
data.forEach((point, index) => {
const x = padding + (point.time / maxTime) * (canvas.width - 2 * padding);
const y = canvas.height - padding - ((point.flux - minFlux) / (maxFlux - minFlux)) * (canvas.height - 2 * padding);
if (index === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
});
ctx.strokeStyle = '#ffcc00'; // Yellow-gold for the light curve, evoking stars
ctx.lineWidth = 2;
ctx.stroke();
// Highlight transit dips (simple rectangles for emphasis)
data.forEach(point => {
if (point.flux < 0.996) { // Arbitrary threshold for dips
const x = padding + (point.time / maxTime) * (canvas.width - 2 * padding) - 2; // Small offset for visibility
const y = canvas.height - padding - ((point.flux - minFlux) / (maxFlux - minFlux)) * (canvas.height - 2 * padding);
ctx.fillStyle = 'rgba(255, 0, 0, 0.3)'; // Red semi-transparent for transit highlight
ctx.fillRect(x - 5, y - 5, 10, 10); // Small square at dip points
}
});
// Add a simple animation to draw the line (optional for engagement)
// This is a basic implementation; for smoother animation, a library could be used.
let index = 0;
const animate = () => {
if (index < data.length) {
const point = data[index];
const x = padding + (point.time / maxTime) * (canvas.width - 2 * padding);
const y = canvas.height - padding - ((point.flux - minFlux) / (maxFlux - minFlux)) * (canvas.height - 2 * padding);
ctx.lineTo(x, y);
ctx.stroke();
index++;
requestAnimationFrame(animate);
}
};
// Reset the path and start animation on load
ctx.beginPath();
ctx.moveTo(padding + (data[0].time / maxTime) * (canvas.width - 2 * padding), canvas.height - padding - ((data[0].flux - minFlux) / (maxFlux - minFlux)) * (canvas.height - 2 * padding));
animate();
</script>
</body>
</html>
Explanation of the Code:
- HTML Structure: The page is structured with a header, a main container for content, and a footer. It includes sections for explanation and visualization.
- CSS: Embedded in the
<style> tag, it creates a dark, space-themed aesthetic with gradients, shadows, and responsive design. Colors like cyan and yellow-gold evoke a cosmic feel.
- JavaScript: Embedded in the
<script> tag, it uses the HTML5 canvas to draw a simple line graph of a simulated light curve. The data is hardcoded as an array of time and flux values, showing periodic dips. A basic animation draws the line over time for interactivity.
- Visualization: The graph includes axes, labels, and highlighted transit dips. It's kept simple and self-contained without external libraries for a true single-file approach.
- Beauty and Usability: The design is clean, responsive, and educational, with engaging text and visual elements. Users can view the animation of the light curve being drawn, making the concept more intuitive.
This HTML file can be saved and opened in any modern web browser to display the visualization. If you need enhancements, such as real TESS data integration or more advanced interactivity, let me know!