Skip to content

Latest commit

 

History

History
165 lines (148 loc) · 4.08 KB

File metadata and controls

165 lines (148 loc) · 4.08 KB

BSD Demo Output Files Description

Overview

This document describes the structure and contents of output files generated by the BSD operator-Fredholm framework demos.

Output Directory Structure

data/
├── a_ell_<curve>_B<B>.csv              # From script 01
├── principal_part_<curve>_<timestamp>.json    # From script 02
├── gap_poly_<curve>_<timestamp>.json          # From script 03
├── renorm_matrix_<timestamp>.npz              # From script 04
└── bsd_components_<curve>_<timestamp>.json    # From script 05

logs/
├── 01_curve_data_<curve>.txt
├── 02_principal_part_<curve>.txt
├── 03_gap_poly_<curve>.txt
├── 04_renorm_matrix_N<conductor>.txt
└── 05_bsd_components_<curve>.txt

File Formats

1. a_ell__B.csv

CSV file with Fourier coefficients of the curve.

  • Format: CSV with headers
  • Columns:
    • ell: prime number
    • a_ell: Fourier coefficient a_p

2. principal_part__.json

JSON file containing principal part computation results.

  • Structure:
    {
      "curve": "37a1",
      "parameters": {
        "X": 10000.0,
        "eps": 0.001,
        "B": 30000,
        "eta": 1.2
      },
      "curve_data": {
        "conductor": 37,
        "rank": 1
      },
      "results": {
        "t_X_value": {"real": ..., "imag": ...},
        "log_det_fin": {"real": ..., "imag": ...},
        "log_L": {"real": ..., "imag": ...},
        "L_value": {"real": ..., "imag": ...}
      },
      "slope_checks": [...],
      "t_X_terms": [...],
      "metadata": {
        "timestamp": "ISO-8601 timestamp",
        "curve": "37a1"
      }
    }

3. gap_poly__.json

JSON file with Hecke separator polynomial data.

  • Structure:
    {
      "curve": "37a1",
      "parameters": {
        "Lmax": 29,
        "Mmax": 2
      },
      "curve_data": {
        "conductor": 37,
        "num_newforms": 2
      },
      "features": [[2, 1], [2, 2], ...],
      "polynomial_coefficients": [...],
      "feature_vectors": {
        "f": [...],
        "g_0": [...]
      },
      "P_values": {
        "f": 1.0,
        "g_0": 0.123456
      },
      "spectral_gap": 0.876544,
      "metadata": {...}
    }

4. renorm_matrix_.npz

NumPy archive with renormalization matrix data.

  • Contents:
    • matrix: R×R Vandermonde matrix
    • eigenvalues: Eigenvalues of the matrix
    • x_values: Evaluation points [0, log(p1), log(p2), ...]
    • metadata: JSON string with additional info

5. bsd_components__.json

JSON file with all BSD formula components.

  • Structure:
    {
      "curve": "37a1",
      "curve_data": {
        "conductor": 37,
        "rank": 1,
        "torsion_order": 1,
        "torsion_structure": []
      },
      "bsd_components": {
        "rank": 1,
        "regulator": 0.0511114,
        "real_period": 5.98691,
        "tamagawa_product": 1,
        "tamagawa_numbers": {"37": 1},
        "torsion_order": 1,
        "generators": [...]
      },
      "L_series": {
        "L_derivatives": [...],
        "L_r_over_r_factorial": 0.305999
      },
      "bsd_block": {
        "value": 0.305999,
        "formula": "Reg * Omega * prod(c_p) / |E(Q)_tors|^2",
        "note": "Missing factors: |Sha| and kappa"
      },
      "metadata": {...}
    }

Usage Examples

Loading JSON files in Python:

import json

with open('data/principal_part_37a1_20240115_123456.json', 'r') as f:
    data = json.load(f)
    
print(f"Curve rank: {data['curve_data']['rank']}")
print(f"Spectral gap: {data['results']['spectral_gap']}")

Loading NumPy archives:

import numpy as np
import json

data = np.load('data/renorm_matrix_20240115_123456.npz')
matrix = data['matrix']
eigenvals = data['eigenvalues']
metadata = json.loads(str(data['metadata'][0]))

print(f"Matrix determinant: {metadata['determinant']}")
print(f"Condition number: {metadata['condition_number']}")

Notes

  • All timestamps are in ISO-8601 format
  • Complex numbers are stored as {"real": ..., "imag": ...} objects
  • Large arrays may be truncated (e.g., only first 100 t_X terms are saved)
  • The metadata field in each file contains timestamp and curve information