{
  "task": "jdp-tess-run-target",
  "schema_version": 1,
  "record_version": "1.0",
  "synthetic": false,
  "label": "LOCAL INPUT",
  "label_text": "Local-input check. Computed only from the three local files named in this record. This is not a detection, discovery, or novelty claim.",
  "inputs": {
    "target_pixel_file": {
      "path": "research/tess-timing/data/real-run/tpf.fits",
      "filename": "tpf.fits",
      "sha256": "2b5bd6ee4747cfe0c5405c869b871064fd74e4b5f0521c4e6be9fdc2b5c96030",
      "size_bytes": 58026240,
      "format": "fits",
      "synthetic": false,
      "metadata": {
        "TICID": 420814525,
        "SECTOR": 56,
        "CAMERA": 1,
        "CCD": 2,
        "OBJECT": "TIC 420814525",
        "TELESCOP": "TESS"
      }
    },
    "light_curve": {
      "path": "research/tess-timing/data/real-run/lightcurve.fits",
      "filename": "lightcurve.fits",
      "sha256": "1b76b4a4b73e24954fa6e29a7e28a174685113ecdbad1bf10ef0e7b766ce99e9",
      "size_bytes": 2039040,
      "format": "fits",
      "synthetic": false
    },
    "ephemeris": {
      "path": "research/tess-timing/data/sector56-control-run/ephemeris.json",
      "filename": "ephemeris.json",
      "sha256": "2af9da76c572f5239b2a2435e6d0faaedef0f92ce1a0b11f37994d07c8c2fb9e",
      "size_bytes": 997,
      "format": "json",
      "synthetic": false
    }
  },
  "reduction": {
    "quality_mask": {
      "value": 175,
      "bits": [
        1,
        2,
        4,
        8,
        32,
        128
      ],
      "policy": "A cadence is excluded when (QUALITY & mask_value) != 0."
    },
    "aperture": {
      "centroid_method": "flux_weighted_excess_on_threshold_aperture",
      "centroid_row": 5.590477,
      "centroid_col": 5.089302,
      "threshold_fraction_of_peak_excess": 0.05,
      "threshold_flux": 2537.830982971,
      "background_flux": 500.332366943,
      "peak_excess_flux": 40749.972320557,
      "aperture_pixel_count": 14,
      "aperture_mask": [
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          1,
          1,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          1,
          1,
          1,
          1,
          1,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          1,
          1,
          1,
          1,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          1,
          1,
          1,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      ],
      "aperture_rows": [
        4,
        4,
        5,
        5,
        5,
        5,
        5,
        6,
        6,
        6,
        6,
        7,
        7,
        7
      ],
      "aperture_cols": [
        5,
        6,
        3,
        4,
        5,
        6,
        7,
        3,
        4,
        5,
        6,
        4,
        5,
        6
      ],
      "aperture_bounds": {
        "row_min": 4,
        "row_max": 7,
        "col_min": 3,
        "col_max": 7
      },
      "aperture_touches_image_edge": false,
      "annulus_radii_pixels": {
        "inner": 2.0,
        "outer": 3.5,
        "inner_inclusive": true,
        "outer_inclusive": false
      },
      "annulus_pixel_count": 23,
      "annulus_excludes_aperture": true,
      "annulus_fallback_used": false,
      "annulus_rows": [
        3,
        3,
        3,
        3,
        3,
        4,
        4,
        4,
        4,
        5,
        5,
        6,
        6,
        7,
        7,
        7,
        7,
        8,
        8,
        8,
        8,
        8,
        9
      ],
      "annulus_cols": [
        3,
        4,
        5,
        6,
        7,
        2,
        3,
        7,
        8,
        2,
        8,
        2,
        8,
        2,
        3,
        7,
        8,
        3,
        4,
        5,
        6,
        7,
        5
      ]
    },
    "photometry_counts": {
      "input_cadences": 20079,
      "quality_pass": 19612,
      "retained": 19612,
      "rejected_by_quality_mask": 467,
      "rejected_nonfinite_pixel": 0,
      "rejected_zero_weight_pixel": 0,
      "rejected_background": 0
    },
    "background_counts": {
      "annulus_pixels_total": 23,
      "per_cadence_min": 22,
      "per_cadence_max": 23,
      "per_cadence_median": 23.0,
      "background_flux_min": 460.3759765625,
      "background_flux_max": 546.2338256835938
    },
    "light_curve_counts": {
      "input_rows": 20079,
      "finite_time": 19630,
      "after_quality_mask": 19612,
      "retained": 18792,
      "removed_nonfinite_time": 449,
      "removed_by_quality_mask": 18,
      "removed_nonfinite_quality": 0,
      "removed_nonfinite_flux": 820
    },
    "common_mask": {
      "matched_cadences": 18792,
      "unmatched_aperture_cadences": 820,
      "unmatched_light_curve_cadences": 0,
      "time_tolerance_seconds": 60.0,
      "max_time_offset_seconds": 0.0,
      "normalization": {
        "method": "median",
        "aperture_median_raw_flux": 195041.7751159668,
        "description": "The matched aperture flux and its uncertainty are divided by the median matched aperture flux."
      },
      "mission_comparison": {
        "sap_rms_difference_ppm": 790.5643303690548,
        "pdcsap_rms_difference_ppm": 1019.4262744242952,
        "sap_pearson_r": 0.9615756722500743,
        "pdcsap_pearson_r": 0.9338923739882716
      }
    }
  },
  "detrend": {
    "module": "tess_timing.detrend.detrend_flux",
    "method": "gap_aware_centered_running_median",
    "settings": {
      "window": 101,
      "sigma_clip": 3.0,
      "sigma_iterations": 3,
      "gap_factor": 1.5,
      "max_gap_cadences": 3,
      "nominal_cadence_days": 0.0013888598409721453,
      "gap_threshold_days": 0.002083289761458218
    },
    "in_transit_mask": {
      "applied": true,
      "duration_days": 0.128,
      "cadences": 737
    },
    "residual_offset_applied": 1.0,
    "counts": {
      "cadences": 18792,
      "finite_flux": 18792,
      "in_transit": 737,
      "clipped": 490,
      "used": 17565,
      "trend_defined": 17705,
      "trend_undefined": 1087,
      "long_gaps": 4
    },
    "usable_cadences": 17705
  },
  "fit_window": {
    "applied": false,
    "half_width_days": null,
    "predicted_epoch_days": 2840.8788973898572,
    "cadences_before": 17705,
    "cadences_after": 17705,
    "excluded_cadences": 0,
    "selection": "Full-sector default. No fixed single-transit window is applied, so every usable cadence is passed to the fit."
  },
  "ephemeris": {
    "input": {
      "path": "research/tess-timing/data/sector56-control-run/ephemeris.json",
      "filename": "ephemeris.json",
      "sha256": "2af9da76c572f5239b2a2435e6d0faaedef0f92ce1a0b11f37994d07c8c2fb9e",
      "size_bytes": 997,
      "format": "json"
    },
    "values": {
      "period_days": 3.52474859,
      "t0_days": -5340.0625800001435,
      "u1": 0.0,
      "u2": 0.0,
      "impact_parameter": 0.0,
      "dilution": 0.0,
      "duration_days": 0.128,
      "source": "NASA Exoplanet Archive pscomppars via the committed target docket and data/fetch-run/TARGETS.json; ephemeris reference Albrecht et al. 2012",
      "document_keys": [
        "dilution",
        "duration_days",
        "duration_hours",
        "duration_uncertainty_hours",
        "fixed_parameter_note",
        "impact_parameter",
        "period_days",
        "period_uncertainty_days",
        "reference_label",
        "reference_url",
        "reference_year",
        "sector",
        "source",
        "synthetic",
        "t0_bjd_tdb",
        "t0_days",
        "t0_uncertainty_days",
        "target",
        "task",
        "tic_id",
        "u1",
        "u2"
      ]
    }
  },
  "fit": {
    "estimator": "tess_timing.fit.fit_transit",
    "model": "tess_timing.transit.transit_flux",
    "parameter_names": [
      "t0",
      "radius_ratio",
      "duration",
      "baseline_offset",
      "jitter"
    ],
    "parameters": {
      "t0": 2840.87973012265,
      "radius_ratio": 0.048341747264963965,
      "duration": 0.10716819265806854,
      "baseline_offset": -3.52375892953022e-05,
      "jitter": 8.318514346369933e-06
    },
    "uncertainties": {
      "t0": 0.00019472032724782753,
      "radius_ratio": 0.0005193916444012557,
      "duration": 0.0006221955720671647,
      "baseline_offset": 7.983707838893539e-06,
      "jitter": 0.015964959460797592
    },
    "covariance_parameter_names": [
      "t0",
      "radius_ratio",
      "duration",
      "baseline_offset",
      "jitter"
    ],
    "covariance": [
      [
        3.7916005843501043e-08,
        -3.217828572268254e-09,
        -3.938948872200914e-09,
        -1.3937188830154545e-11,
        3.957802692203675e-09
      ],
      [
        -3.217828572268254e-09,
        2.697676802738404e-07,
        -2.201266046412542e-08,
        6.465094720284953e-10,
        -5.862985360971142e-09
      ],
      [
        -3.938948872200914e-09,
        -2.201266046412542e-08,
        3.871273298999863e-07,
        1.6787884600015113e-10,
        7.761644008175644e-09
      ],
      [
        -1.3937188830154545e-11,
        6.465094720284953e-10,
        1.6787884600015113e-10,
        6.373959085681013e-11,
        -2.247949096134565e-11
      ],
      [
        3.957802692203675e-09,
        -5.862985360971142e-09,
        7.761644008175644e-09,
        -2.247949096134565e-11,
        0.00025487993058491057
      ]
    ],
    "fixed_parameters": {
      "period": 3.52474859,
      "u1": 0.0,
      "u2": 0.0,
      "impact_parameter": 0.0,
      "dilution": 0.0
    },
    "initial_guess": {
      "reference_t0_days": -5340.0625800001435,
      "t0_guess_days": 2840.8788973898572,
      "method": "nearest supplied ephemeris epoch to the median matched time"
    },
    "rms_ppm": 1054.2533336109923,
    "chi_square": 300.38627638760033,
    "degrees_of_freedom": 17700,
    "chi_square_per_dof": 0.016970976067096064,
    "in_transit_cadences": 503,
    "cadence_count": 17705,
    "convergence": {
      "converged": true,
      "status": 2,
      "message": "`ftol` termination condition is satisfied."
    }
  },
  "software": {
    "python": "3.12.1",
    "numpy": "1.26.4",
    "scipy": "1.15.3",
    "astropy": "7.2.0",
    "tess_timing": "0.1.0"
  },
  "limits": [
    "This is a local input software check. It is not a detection, a discovery, a new epoch, or a novelty claim.",
    "No target is selected, no TIC identifier is used, no sector is chosen, and no network request is made.",
    "The period, limb-darkening coefficients, impact parameter, and dilution are fixed at the supplied ephemeris values.",
    "The trend is a running median, not a physical model. The fit does not include eccentricity, transit timing variations, starspots, or a physical noise model.",
    "Uncertainties are the least-squares covariance scaled by the reduced chi-square, not a posterior or a full error budget.",
    "The result applies only to the files whose SHA-256 digests are recorded."
  ]
}
