demos

Interactive showcase of modern al-folio features tailored for astrophysics and multi-messenger research.


1. Interactive Transient Light Curve Visualizer

Powered by Chart.js. Click on filter labels (ZTF-g, ZTF-r, ZTF-i, Kilonova Fit) in the legend below to toggle data streams and model comparisons dynamically!

Simulated fast-transient photometry and theoretical radioactive decay model curves ($\lambda_{\text{eff}} \in [4770, 7550]\,\text{Ã…}$).

2. Multi-Messenger Rapid Response Architecture

Rendered natively with Mermaid.js. Flowchart describing automated transient triage from gravitational-wave trigger to Target-of-Opportunity follow-up.

flowchart TD
    subgraph Trigger ["1. Alert Triggers"]
        GW["LIGO / Virgo / KAGRA<br/>Gravitational Wave Alert"]
        GRB["Fermi / Swift<br/>Gamma-Ray Burst Alert"]
    end

    subgraph Surveys ["2. Optical Survey Discovery"]
        ZTF["Zwicky Transient Facility (ZTF)<br/>Alert Stream"]
        Sky["Survey Photometry & Subtraction"]
    end

    subgraph Inference ["3. Automated NMMA Inference Engine"]
        Fitter["NMMA Bayesian Fitter<br/>(Neural Network Surrogate Models)"]
        Prioritize["Multi-Armed Bandit<br/>Candidate Prioritization"]
    end

    subgraph Response ["4. Observation Coordination"]
        Marshal["SkyPortal / GCN Circulars<br/>Community Alert Dissemination"]
        ToO["Target-of-Opportunity (ToO)<br/>Keck / Gemini / VLT Follow-Up"]
    end

    GW --> ZTF
    GRB --> ZTF
    ZTF --> Sky
    Sky --> Fitter
    Fitter --> Prioritize
    Prioritize --> Marshal
    Marshal --> ToO

    style GW fill:#1e3a8a,stroke:#3b82f6,color:#fff
    style GRB fill:#1e3a8a,stroke:#3b82f6,color:#fff
    style Fitter fill:#065f46,stroke:#10b981,color:#fff
    style Prioritize fill:#065f46,stroke:#10b981,color:#fff
    style Marshal fill:#7c2d12,stroke:#f97316,color:#fff
    style ToO fill:#831843,stroke:#ec4899,color:#fff

3. Multi-Platform Code Tabs

Powered by jekyll-tabs. Easily showcase how to run your tools across Python, CLI, and HPC Slurm environments.

  • from nmma.em import LightCurveFitter
    import numpy as np
    
    # Initialize the NMMA light curve fitting engine
    fitter = LightCurveFitter(
        model="Bu2019lm",  # Bulla (2019) kilonova dynamical + wind ejecta model
        data_path="ztf_candidate_lightcurve.csv",
        nlive=512,
        priors={
            "log10_mej_dyn": [-3.0, -1.0],
            "log10_mej_wind": [-3.0, -0.7],
            "phi": [15, 75]
        }
    )
    
    # Run Bayesian parameter estimation via nested sampling
    results = fitter.fit()
    print(f"Estimated dynamical ejecta mass: {results.summary['mej_dyn']:.3e} M_sun")
    
  • # Run NMMA candidate inference directly from the terminal
    nmma_fit \
      --data ./ztf_alerts/ZTF25abjmnps.csv \
      --model Bu2019lm \
      --prior-file priors/kilonova_default.prior \
      --nlive 1024 \
      --outdir ./fits/ZTF25abjmnps/ \
      --plot-lightcurves \
      --send-slack-alert
    
  • #!/bin/bash
    #SBATCH --job-name=nmma_ztf_fit
    #SBATCH --partition=msismall
    #SBATCH --nodes=1
    #SBATCH --ntasks=16
    #SBATCH --time=02:00:00
    #SBATCH --output=logs/nmma_%j.out
    
    module load python/3.10
    source activate nmma-env
    
    # Execute parallel sampling across 16 CPU cores at MSI
    mpirun -np 16 nmma_fit_parallel \
      --data ${SLURM_SUBMIT_DIR}/alerts/latest.csv \
      --model Me2017 \
      --outdir ${SLURM_SUBMIT_DIR}/results/
    

4. Interactive Research Journey Map

Rendered using Leaflet.js. Explore research affiliations, observatories, and conference host institutions worldwide.


5. Mathematical Formulations (MathJax / KaTeX)

Al-folio seamlessly compiles both inline and block LaTeX equations.

In radioactive kilonova modeling, the energy generation rate from beta-decaying $r$-process nuclei is governed by:

\[\dot{\epsilon}_{\text{radio}}(t) = \epsilon_0 \left(\frac{t}{1\,\text{day}}\right)^{-\alpha} \text{erg}\,\text{s}^{-1}\,\text{g}^{-1}\]

The characteristic optical diffusion timescale $\tau_d$ of the ejecta depends on the opacity $\kappa$, ejecta mass $M_{\text{ej}}$, and expansion velocity $v_{\text{ej}}$:

\[\tau_d = \sqrt{\frac{2 \kappa M_{\text{ej}}}{\beta c v_{\text{ej}}}} \approx 1.0\,\text{day} \left(\frac{\kappa}{1\,\text{cm}^2\,\text{g}^{-1}}\right)^{1/2} \left(\frac{M_{\text{ej}}}{0.01\,M_\odot}\right)^{1/2} \left(\frac{v_{\text{ej}}}{0.2\,c}\right)^{-1/2}\]

6. Publications & Citation Integration

Check out real-time citation tracking, BibTeX exports, and paper links on your Publications Page featuring BibSearch real-time filtering, Altmetric attention badges, and Google Scholar integration!