|
1 | | -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# Interactive Light-Curve Visualization and Analysis Tool |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +## Overview |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +This program is an interactive, web-based visualization system designed for exploratory analysis of **time-resolved astronomical light-curve data**, with a particular focus on **ZTF J1539 PSF surface-brightness measurements** used in **JWST precision timing studies**. The application enables users to seamlessly switch between **raw observational data** and **statistically averaged representations**, while preserving a direct link between aggregated points and their underlying measurements. |
6 | 6 |
|
7 | | -```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
15 | | -``` |
| 7 | +## Core Functionality |
| 8 | + |
| 9 | +The system renders **dual-panel light curves** using Plotly, displaying **short-wavelength (SW)** and **long-wavelength (LW)** surface brightness measurements simultaneously. Users can: |
| 10 | + |
| 11 | +- Select different data representations (**raw**, **averaged**, or **combined**) |
| 12 | +- Configure binning parameters |
| 13 | +- Choose among multiple x-axis domains: |
| 14 | + - Phase |
| 15 | + - MJD |
| 16 | + - Absolute time |
| 17 | + - Derived temporal units (days, hours, minutes, seconds) |
| 18 | + |
| 19 | +A central design goal of the tool is **traceability**: every averaged data point retains a mapping to the raw points that contributed to it. This mapping allows users to drill down from a statistical summary to the exact measurements used to compute it. |
| 20 | + |
| 21 | +## Interactive Exploration |
| 22 | + |
| 23 | +The program supports rich, event-driven interaction: |
| 24 | + |
| 25 | +- Clicking an **averaged point** dynamically opens a floating panel displaying all associated raw data points. |
| 26 | +- The raw-data panel is **draggable and resizable**, allowing side-by-side comparison with the main light curve. |
| 27 | +- The raw view overlays the **mean value and uncertainty bands**, enabling visual assessment of scatter and outliers. |
| 28 | +- Users can interactively switch the **raw-data x-axis** (e.g., phase → time → seconds) without recomputing the data. |
| 29 | + |
| 30 | +Hover interactions provide **context-aware tooltips**, showing metadata such as epoch, radial bounds, phase, MJD, and measurement uncertainty, ensuring that scientific context is always available. |
| 31 | + |
| 32 | +## Raw-Data Filtering and Quality Control |
| 33 | + |
| 34 | +To support data-quality assessment, the program includes configurable **raw-point filtering mechanisms**: |
| 35 | + |
| 36 | +- **Percent-based filtering**, which keeps points within a user-defined percentage of the average |
| 37 | +- **Sigma-band filtering**, which selects points within a specified standard-deviation range |
| 38 | + |
| 39 | +Filters can be applied **inside or outside** the selected band, and the accepted range is visually highlighted directly on the plot. Filtered results update both the displayed raw points and the corresponding averaged annotations, enabling rapid sensitivity testing of binning and filtering assumptions. |
| 40 | + |
| 41 | +## Image-Linked Annotations |
| 42 | + |
| 43 | +For datasets with associated observational images, the tool allows users to: |
| 44 | + |
| 45 | +- Click individual raw or averaged points to **attach annotated thumbnails** |
| 46 | +- Maintain a synchronized collection of selected images below the plot |
| 47 | +- Open high-resolution images in a modal view alongside contextual numerical values extracted from the plotted data |
| 48 | + |
| 49 | +This tightly integrates **numerical trends and image-level evidence**, supporting visual validation of astrophysical features or anomalies. |
16 | 50 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 51 | +## Architecture and Design |
18 | 52 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 53 | +The system is implemented as a **client-side React / Next.js application**, leveraging: |
20 | 54 |
|
21 | | -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 55 | +- **React Plotly.js** for high-performance interactive plotting |
| 56 | +- A centralized **PlotSettings context** for consistent global state management |
| 57 | +- Modular utilities for trace construction, filtering, and annotation generation |
| 58 | +- Dynamic imports to ensure compatibility with server-side rendering constraints |
22 | 59 |
|
23 | | -## Learn More |
| 60 | +The architecture cleanly separates **data processing**, **visual styling**, and **interaction logic**, making the tool extensible to additional targets, wavelength bands, or survey datasets. |
24 | 61 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 62 | +## Intended Use |
26 | 63 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 64 | +This program is intended for astronomers and data analysts who require: |
29 | 65 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 66 | +- Transparent linkage between averaged results and raw observations |
| 67 | +- Interactive validation of binning, filtering, and uncertainty modeling |
| 68 | +- High-precision timing and variability studies using JWST-related datasets |
31 | 69 |
|
32 | | -## Deploy on Vercel |
| 70 | +By combining statistical aggregation with direct access to raw measurements and imagery, the tool bridges the gap between **quantitative analysis** and **visual inspection**, enabling more robust scientific interpretation. |
33 | 71 |
|
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
35 | 72 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 73 | +## Installation and Getting Started |
| 74 | + |
| 75 | +### Prerequisites |
| 76 | + |
| 77 | +Before installing the project, ensure you have the following installed: |
| 78 | + |
| 79 | +- **Node.js** (version 18 or later recommended) |
| 80 | +- **npm**, **yarn**, or **pnpm** (npm is used in the examples below) |
| 81 | +- A modern web browser (Chrome, Firefox, Edge) |
| 82 | + |
| 83 | +### Installation |
| 84 | + |
| 85 | +1. **Clone the repository** |
| 86 | + |
| 87 | +```bash |
| 88 | +git clone https://github.com/your-org/your-repo-name.git |
| 89 | +cd your-repo-name |
| 90 | +``` |
| 91 | + |
| 92 | +2. **Install dependencies** |
| 93 | +```bash |
| 94 | +npm install |
| 95 | +``` |
| 96 | + |
| 97 | +3. **Build** |
| 98 | +```bash |
| 99 | +npm run build |
| 100 | +``` |
| 101 | + |
| 102 | +4. **Start** |
| 103 | +```bash |
| 104 | +npm run start |
| 105 | +``` |
0 commit comments