Full differential-photometry pipeline for variable-star monitoring and ground-based exoplanet transit detection — calibration, field tracking, ensemble photometry, Lomb-Scargle + BLS period search, phase folding, SIMBAD/VSX identification, and AAVSO-compliant export in single or multi-band form. (Formerly the Exoplanet Transit Detector.)
At the top of the dialog, pick which stage you're starting from:
| Mode | Input | Workflow |
|---|---|---|
| Calibrated Subs (default) | Frames already calibrated (dark + flat), registered or not — e.g. Stacking Suite's Calibrated or Aligned_Images folder. Unregistered frames are the better input: the tool tracks the field in every frame itself (§2). | One-click Load, Measure & Photometry button — loads, detects stars, runs full photometry pipeline. |
| Raw Subs | Uncalibrated raw light frames | Three-step: Load Raw Subs → load Master Dark / Master Flat → Calibrate & Align Subs → Measure & Photometry. |
Mode switching shows and hides the relevant controls. Raw mode exposes the master-dark / master-flat loaders and calibration button; Calibrated mode hides them because the frames are already calibrated.
_wcs_bin_factor so pixel-to-sky conversions apply the correct scaling regardless of whether the WCS came from a header (full-resolution) or the solver (binned).
Both modes present a multi-select file picker (FITS, FIT, XISF, TIFF, TIF supported). A file picker shows one folder at a time, so for nights kept in separate folders load the first, then Load again: with frames already loaded you are asked whether to Add the new ones to them or Replace them. Files are read in parallel for header metadata, then sorted chronologically before loading pixel data. The time parsing hierarchy is:
UT-OBS if present (already in UTC)DATE-OBS (treated as ISO-UTC; timezone offsets like -0700 are auto-normalized to -07:00)DATE-END as fallbackMJD-OBS as the most robust final fallbackXISF files have their FITSKeywords block queried for the same keys. Any frame that fails to parse a time ends up at the end of the sort, after all time-stamped frames. The resulting ordered list drives everything downstream — the light curve x-axis, the reference frame selection, and the AAVSO JD field.
Each loaded frame also harvests two more fields:
EXPOSURE or EXPTIME. Needed for AAVSO export (per-frame integration).AIRMASS directly, or computed from altitude keys (OBJCTALT, ALT, ALTITUDE, EL) via X = 1/sin(h). Defaults to 1.0 if nothing is found.In Raw mode, two buttons let you load Master Dark and Master Flat files. Status labels flip from ❌ to ✅ when a master is successfully loaded. The dark and flat shapes must be compatible; mismatches surface as a warning and refuse the load. The masters are kept unbinned and binned to the frames' software bin when calibration runs.
Calibrate & Align Subs runs the full raw-to-aligned conversion on every loaded frame:
Save Aligned Frames writes the calibrated and aligned stack back to disk — useful if you want to inspect intermediate frames or feed them to a different downstream tool.
The orange wrench button at top-right opens the full configuration panel, organized into three sections:
Once frames are loaded (and calibrated if raw), Measure & Photometry runs the full detection, aperture photometry, plate-solving, and ensemble normalization pipeline. In Calibrated mode, Load, Measure & Photometry combines the load and run into one click.
Progress updates stream in real-time. The pipeline:
.fits.fz files (BANZAI output) load directly. Times are mid-exposure from DATE-OBS/MJD-OBS + EXPTIME/2; the site comes from LATITUDE/LONGITUD/HEIGHT (or SITELAT/SITELONG and the other common spellings); SATURATE/MAXLIN mark saturated stars. Frames do not need to be pre-aligned.
A second window appears showing the reference frame with every detected star circled. Click any circle to select that star in the main dialog's list. Shift-click adds to the selection. Click the main-dialog list and watch the overlay highlight update in real time (red = currently selected, yellow = flagged for dip, blue = normal).
Each detected star appears in the left-column list showing its index, x,y pixel position and its robust scatter σ in ppt. Tags: [COMP] — in the comparison ensemble; [SAT n%] — saturated in n% of frames; [DIP …] / [VAR] — flagged by the screening (§9). Click one or more entries (Ctrl-click to multi-select) and the right-side plot updates with the selected light curves in distinct colors. Drag the divider between the list and the plot to give either one more room; the split is remembered. A star named by Identify Star or Find Star (§10, §11) shows its name after its number.
The plot shows:
The x-axis shows hours since the first frame (mid-exposure UTC) when timestamps are available, or frame index when they aren't.
The Plot selector above the chart switches between two views of the same data:
Save Plot… saves what is shown: the Scientific figure as a 300 dpi PNG, a PDF or an SVG (the vector formats keep text and axes sharp; the many unbinned points are rasterised to keep the file small), the Graphical plot as a PNG screenshot. The choice of style and bin width is remembered and shared with Fit Transit.
Each point's error bar combines two terms:
Slow, correlated systematics are not part of a point's error bar; the transit fit handles them with the red-noise factor β (§18.9b).
Frames are grouped into observing nights: local noon to local noon from the site longitude in the headers (or, without one, split at gaps longer than 6 h), and separately per telescope, since an LCO sequence can hand off between sites with no daytime gap. Load every night's frames together, in one Load or with Add when the nights sit in different folders (§2); they don't need to be registered to one another, since every frame is tracked. When there is more than one night a Night selector appears next to Detrend:
Detrending is fitted over all nights at once and removes only what happens within each night (one airmass coefficient shared by every night, or per-night time terms); each night's level is fitted but never divided out, so a long-period variable's change from night to night survives. The screening gives each night its own level, so the step between two nights is never mistaken for a dip, and, with Settings → Screening → Flag night-to-night variability on, flags VAR night-to-night when a star's night levels vary well beyond the comparison stars' own night-to-night scatter. That test is for long-period variables (Miras, semiregulars) and is off by default: a transit happens within one night, and a flat-field residual that changes from night to night trips it too. On the NGC660 data 6 of the 18 stars along one edge of the frame were flagged that way, against 7 of the other 297. Variables flagged on any night stay out of the comparison and check stars. Analyze Star uses every night (each normalised to its own median for the BLS search); Fit Transit fits one night — it opens on the selected night, or on the night that covers the predicted transit once the planet is looked up.
After a meridian flip the field is turned 180° on the sensor, so every star lands on a different part of it, and any flat-field or vignetting error turns into a per-star step in brightness. On the NGC660 data that step was 8–20 ppt with a flat and 80–190 ppt without one. Each frame's pier side is read from, in order:
PIERSIDE keyword;FLIPPED keyword, when it changes within the set;Registered frames all face the same way, so tracking alone can't see the flip in them. Every (night, pier side) segment then gets its own level in the detrending, the dip search and the outlier test. The step is divided out, and each night's level is kept. A dip box must leave enough baseline in every segment it touches, so a box can't swallow a short segment and pass its level off as a dip. Fit Transit fits a flux step for the far pier side (fs) when the night contains a flip, which is AstroImageJ's meridian-flip offset. The status line says when a flip was found and how.
The Detrend combo in the top-right offers four options. Changing it re-screens every star immediately.
Trends are fitted in time with iterative 3σ clipping and divided out; a trend that would go non-positive or swing by more than 2× is refused rather than applied. The detection statistics in §9 don't use the divided curve at all — the dip search fits the same baseline jointly with the dip.
Every star's light curve is screened for two kinds of signal, and flagged when it clears both controls:
Relative to the field (on by default; Settings → Screening). Each star's dip significance, von Neumann statistic and amplitude are also compared with stars of similar brightness: the median and robust spread (1.4826 × MAD) of the same statistic among stars within ±0.5 mag, widened to at least 30 stars. A star is flagged only if it stands that many σ above them (default 5). DIP needs the dip significance to stand out; VAR needs both the von Neumann statistic and the amplitude to. This is the survey practice of Sokolovsky et al. (2017, the VaST study). Systematics shared by the whole field — seeing-dependent aperture loss, flat-field error, a meridian flip, thin cloud — raise every star's statistics together. A fixed cut then flags everything, which happened on real data before this: 281 of 321 stars flagged. The DIP entry shows how far above the field the star stands ("field +9σ").
One night at a time. With several nights loaded, the dip search runs on each night alone, with that night's own baseline and red noise, and All nights shows the best night's dip. A transit happens within one night, and one search across every night let the noisiest night's red noise set the bar for all of them. On NGC660 that turned a 40 ppt, 17.8σ dip into a diluted 2-hour box of 22 ppt at 6.6σ, so All nights and the single-night view showed different boxes.
Aperture test. Every dip candidate is re-measured at the largest aperture (3 × FWHM) against the same comparison stars. A real eclipse dims the whole star, so its depth is the same in any aperture. Light smeared out of the aperture by a change in the star's image — the telescope settling after a meridian flip, a focus shift, coma toward a corner — makes a "dip" that fades as the aperture grows. A dip whose depth at the large aperture is under half its depth at the photometry aperture, by more than 3σ, is withdrawn; the list shows it as dip ✗ PSF with both depths (hover over the entry for the explanation), and the plot title says so. A brighter neighbour inside the large aperture also dilutes a dip, so check blends by eye.
Stars usable in fewer than half the frames (saturated or off the edge most of the time) are not judged. A flagged star with a neighbour at least a quarter as bright within two aperture radii is tagged blend?: the apertures share light, and the share changes with seeing, which is a common source of false variability.
Flagged stars are highlighted yellow in the list and the overlay, with the dip depth and significance in the list entry; the status bar reports the counts.
Select exactly one star, click Identify Star…. The tool projects the star's pixel position through the WCS to RA/Dec, queries SIMBAD within 15" of that position, and returns the best match. For contested regions where multiple catalog entries fall nearby, a scoring system prefers:
Angular offset is subtracted from the score as a tiebreaker. If the best SIMBAD match still isn't flagged as variable, a VSX cone search within the same radius looks for a variable-star designation to upgrade to. The result dialog shows the ID, otype, V magnitude, and offset, with a one-click button to open the full SIMBAD page in your browser.
The name sticks. Once a star is identified, its name replaces "Star #N" in the plot titles and legends, the list, the Analyze Star window and Fit Transit, with the list number kept in brackets: CSS_J014208.2+135125 (#82). A match only names the star when it lies within 5″ of it; the lookup prefers a variable anywhere within 15″, and that can be a neighbour. The Gaia DR3 fallback names it when the Gaia source is within 3″. Find Star (§11) names the star it selects with the name you typed. Names last until the next Load & Measure, which numbers the stars afresh.
The reverse operation: enter any SIMBAD-resolvable name (e.g. "V336 Aps", "HD 12345", "TYC 9256-617-1", "Gaia DR3 ...") and the tool resolves the name to RA/Dec, projects back through the WCS to detector pixel coordinates, and selects the nearest detected star in the list.
The matching tolerance adapts to the data: it's the maximum of 2× the median FWHM in detector pixels, 10 arcseconds converted to detector pixels using the WCS plate scale, and a 6-pixel floor. If no star is within tolerance, you get a specific diagnostic — "resolves to pixel (X,Y) but closest detected star is N pixels away" — so you know whether SEP dropped the star (faint, border, saturated) or the target isn't in frame at all.
All stars are normalised against one weighted comparison ensemble (§18.6) — the stars tagged [COMP]. Show Ensemble Members highlights them in light blue. A comparison star's own light curve is computed against the ensemble without itself, so a comparison can never cancel its own variability. Stars rejected from the ensemble as variable or noisy are counted in the status line.
Select exactly one star, click Analyze Star…. A tabbed window opens with these panels:
| Tab | Shows |
|---|---|
| Lomb-Scargle | LS periodogram covering frequencies from 1/Tspan to the Nyquist limit. Peak marked in yellow. Best for continuous variability (sine-like signals, pulsators). |
| Variable Star Fold | The light curve folded at a period you choose: the Lomb-Scargle peak (default), twice it, the BLS period, twice that, or one you type (Custom). An EW binary's two minima put both periodograms at half its period, so use a 2 × choice for one. Phase 0 is minimum light and two cycles are shown, with 50 phase bins per cycle (yellow). The line above the plot gives the period in days and hours, the JD (UTC) of a minimum, the binned amplitude in magnitudes and how many cycles the data cover. By default the curve is the differential flux before detrending, every night at its own level, because a trend fit can take part of a slow variation with it; Detrended uses the main window's curve instead, which also divides out the step at a meridian flip. |
| BLS Periodogram | Box Least Squares periodogram, whitened (running-median background subtracted) and plotted on a per-period axis. Best peak marked in red. Best for sharp transit-shaped dips. |
| Phase Fold | The light curve folded at the best BLS period, in hours from mid-transit, laid out like Fit Transit: detrended points, binned means with error bars (yellow), the limb-darkened transit model (red), the BLS box (dashed) and the residuals underneath. It opens on the transit; zoom out, or click the A button, for the whole orbit. |
| Odd / Even | Shown when the fold has transits at both odd and even epochs. The odd and even transits are plotted side by side on shared axes, each with the model scaled to its own depth (red) and the joint model (dashed). |
| Light Curve | Raw calibrated curve with predicted transit centers marked by vertical dashed lines at integer multiples of the found period from t₀. |
The window title summarizes the result: Analysis: Star #42 | P = 1.4237 d | SDE = 8.3. Underneath, the first line is the BLS result: box duration (hours), box depth (ppt), SDE, alias penalty, and number of per-night dips detected. The second line is the transit model fitted to the fold: Rp/R*, depth with limb darkening, T14, impact parameter b, a/R*, Tc, how far the model stands above a flat line (σ) and the residual scatter. The third line counts the points inside the transit and the separate transits they come from. Further lines appear when they apply: the odd/even depths, nights left out of the fit, and the flip-step correction.
A single transit. This is the usual case: one dip, then the hunt for the next one weeks, months or years later. Analyze reports it as a result. Tc, depth and T14 are the measurement. The period is not: with one transit, the BLS period is just one of the periods the other nights don't rule out, so the summary says so.
Box versus transit model. BLS fits a box: the flux drops instantly, stays flat and comes straight back up. That is how it finds the period quickly, but it isn't the shape of a transit. On the fold, Analyze fits the transit model Fit Transit and EXOTIC use, at the BLS period. The planet's disc takes time to cross the edge of the star, so ingress and egress are slopes; limb darkening rounds the floor; and the model is averaged over each exposure. Before the fit, the systematics (airmass, per-night levels, the pier-side step) are refitted with the transit frames masked, so the baseline can't absorb part of the dip, and every night is set to its out-of-transit median. Limb darkening is fixed at u1 0.465, u2 0.257. For a published transit time use Fit Transit, which also runs the MCMC; the fold is for judging the candidate.
Warnings (orange). Analyze warns about three things:
Several nights. The BLS period grid has to get finer as the data span grows: its step is the shortest trial duration divided by the span squared. That's about 3,500 trial periods for one night, but 28 million for seven nights spread over 27 days, which would take more than a day to compute. Analyze scans at most 100,000 periods, then re-scans each of the strongest peaks at the full resolution. The scan runs on all CPU cores, and a long one shows its progress with a Cancel button. On the 7-night NGC660 data it takes about 17 s. The W UMa binary CSS_J014208.2+135125 (VSX period 0.31167 d) comes out at 0.15583 d, half its period. That is the expected BLS result for an eclipsing binary with two nearly equal eclipses per orbit.
Select the host star, click Fit Transit…. This is the workflow of NASA JPL's Exoplanet Watch pipeline EXOTIC, implemented independently inside SASpro:
rp are recognised). Clear and broadband exoplanet filters map to the nearest standard band, marked approximate.The Plot selector above the chart switches the dialog between the Graphical and Scientific styles (§7). The point errors in the fit carry the same per-frame noise measured from the comparison stars, re-measured for each aperture tried; the summary reports its median.
Standard data export of every star's light curve across every frame. The file format follows the dialog's suffix: .csv gets Pandas-formatted CSV with one row per frame, columns for MJD (mid-exposure UTC), AIRMASS and TRANSPARENCY (the comparison ensemble's relative throughput — clouds show up here), then STAR_i / STAR_i_ERR / FLAG_i / STAR_i_RA / STAR_i_DEC per detected star. FLAG is a bit mask: 1 edge / no-data, 2 saturated, 4 rejected frame, 8 outlier, 16 invalid flux, 32 bad sky. .fits gets a proper multi-HDU FITS with a LIGHTCURVE table (MJD + per-star flux + flag columns) and a STARS table (index, x, y, RA, Dec per star), plus original-header metadata (OBJECT, TELESCOP, DATE-OBS, EXPTIME, FILTER) and pipeline parameters (SEP threshold, border fraction, reference frame index, median FWHM).
Produces an AAVSO Extended Format text file ready for WebObs submission. This is where the tool stops being an analysis plaything and starts producing data someone else can use. Two export paths:
For mono data or when you want one filter at a time. The flow:
Measurements the photometry rejected (saturated, edge, rejected frames, outliers) are excluded from the zero point and the reported rows.
When OSC per-channel photometry is available, you're offered a one-click option to export all three channels interleaved in a single AAVSO Extended file: TB (Blue), TG (Green standardized to V), TR (Red). This is the biggest workflow win for DSLR / OSC observers: one upload, three bands, standardized against catalog B / V / R magnitudes.
For each band, the calibration pipeline tries three tiers in order:
Catalogs are tried in order: MagTool cache (if available from a prior Magnitude Tool session on this frame), APASS DR9 (Johnson V/B + Sloan r'), UCAC4 (same with slightly different coverage). When Sloan r' is used as the R anchor, the NOTES field includes "R anchor = Sloan r' (APASS/UCAC)" so a reviewer knows exactly what was done.
MERR=na rather than dropping the row entirely. The summary dialog at export completion reports the count per filter so you know how many rows got the na-flag treatment.
If TESS has observed your target during one of its sectors, click Query TESScut after selecting a star. The tool downloads the target pixel file (10 arcminute cutout centered on the selected RA/Dec), builds a 2.5-pixel-radius circular aperture, extracts the light curve, clips extreme outliers, and shows the normalized flux via Lightkurve. Results are cached locally so re-querying the same target skips the download.
Useful for cross-checking ground-based variability against the much higher-cadence TESS data — if your 20-ppt dip shows up in TESS at the same period, that's independent confirmation; if TESS shows a flat line, your "candidate" is probably your own systematics.
Star detection, aperture photometry, ensemble normalization, the period search algorithms, the AAVSO calibration tiers, and the plate-solve integration.
Every frame is run through SEP (Barbary 2016, port of SExtractor by Bertin & Arnouts 1996) in parallel across a thread pool sized to 80% of available CPU cores. Per frame:
And ellipticity:
Per-frame stats recorded: star count, mean level, and the median FWHM of the brighter half of the unflagged detections.
The best reference frame is chosen by a quality metric:
which rewards frames with many detections, small PSFs, and low background. The frame with highest Q becomes the detection template for the rest of the pipeline — its SEP catalog defines which stars get photometered, its WCS gets plate-solved, and its star positions are carried onto every other frame by the tracking transform (§18.4).
The reference frame goes to the plate solver. Three paths:
SASWCSSY marker, or a reference point identical to the mount's RA/DEC with no solver keywords) → plate-solved without asking. Such a WCS is arcminutes off: on the NGC660 frames it put stars ~190" from their catalogue positions, which names the wrong star in VSX/SIMBAD and pulls the wrong comparison magnitudes. If the solve fails it is still used, with a warning, because it is good enough for BJD and airmass.The _wcs_bin_factor is tracked throughout: a header WCS is full-resolution (so bin_factor = the software bin when applied to our binned coordinates), solver WCS is already in binned coordinates (so bin_factor = 1). Every pixel-to-sky conversion downstream respects this.
For every frame, an affine transform from reference to frame pixels is estimated from the two SEP catalogs (brightest 60 stars): every reference–frame star pair votes for an offset, the densest offset bin wins, stars are matched within 1.5 × FWHM, and an affine is fitted to the matches by least squares with 3σ clipping. If the vote fails, the same is tried with a 180° rotation (meridian flip), then astroalign on the catalogs. A frame that can't be matched is rejected for every star.
Bright stars (centroid SNR ≥ 15) are additionally recentred with an iterative flux-weighted centroid inside 1.2 × FWHM, accepted only if it stays within 1 FWHM of the prediction. Fainter stars use the transform's prediction, which — fitted on dozens of stars — is better than their own noisy centroid.
Before this, every frame was measured at the reference positions. Any drift walked stars out of their apertures at different times, which is how a light curve ends up swinging between zero and several times its median.
Radii rk = mk · FWHM with m ∈ {0.75, 1, 1.25, 1.5, 1.75, 2, 2.5, 3} (EXOTIC searches 1.5–6 Gaussian σ, the same range), minimum 1.5 px, fixed across frames. The annulus starts 2 px (or 0.5 FWHM) beyond the largest aperture and is at least 5 px wide.
Sky is the median of the annulus pixels after iterative 3σ clipping (stars and cosmic rays in the annulus are clipped out); no-data pixels never enter it. The aperture sum uses exact pixel overlap (SEP, subpix = 0):
with A the aperture area, s̃ and σs the sky median and robust scatter, ns the number of sky pixels and g the gain in electrons per data unit (§4).
Saturation. Saturated pixels are located on the unbinned frame, since binning averages a clipped core away. A measurement whose aperture contains one is flagged, and a star saturated in any frame can't be a comparison star. The level comes from MAXLIN / SATURATE, or from a plateau of pixels sharing the frame maximum (raw data). Calibrated, normalised or registered frames have neither: a clipped core sits at (full well − dark) / flat, which varies across the field with the flat. For those, the flat-topped star cores themselves are found: several pixels within 0.3% of a core's maximum, which an unsaturated PSF can't produce. The level is set 10% under the lowest of them, because CMOS response is already non-linear there. Before this, flat-fielded frames reported no saturation at all. On NGC660 every comparison star was then saturated, and almost every star in the field was flagged variable.
Model: in frame j every star carries an extra fractional variance sj2 beyond the CCD equation, independent from star to star. A transparency change common to the whole field cancels in the differential and never appears. For each comparison star's leave-one-out curve r, the second difference dj = rj − (rj−1 + rj+1)/2 removes slow trends (colour-dependent extinction, a slowly varying comparison) and has variance
over the other comparison stars (their averaged excess). sj2 ≥ 0 is solved so that the median of d2/Var(d) over the comparison stars in a 5-frame window equals the median of a χ²1 variable (0.455). Because it is a median, one variable comparison star or one cosmic ray can't set it. Windows never cross from one night into the next. A star's relative-flux error then becomes
— its own excess plus the weighted ensemble's. The AAVSO magnitude errors add the same term (×2 in the single-comparison fallback). Binned points use the inverse-variance weighted mean, with error 1/√Σw scaled by √χ²red of the bin when that exceeds 1.
Synthetic check (simulated data only): a field with photon noise plus per-star scintillation that grows with airmass and a cloudy stretch, gain known. Normalised residuals of constant stars came out at std 0.97–1.15 in clear, cloudy and high-airmass stretches with these errors, against 1.3–2.5 with the CCD equation alone. With the gain unknown (no Poisson term), they improved from 10–24 to 1.2–1.5. The remaining excess is brightness-dependent noise that a single fractional term can't fully represent, and the transit fit's χ² scaling absorbs it.
Candidates are the brightest stars that are never saturated and usable in ≥ 90% of frames. Each comparison j is normalised to its own median, fj, and weighted by the inverse variance of its scatter against the ensemble of the other comparisons (Broeg, Fernández & Neuhäuser 2005):
Comparisons whose scatter is far in excess of their photometric error (variables, blends, stars on a bad column) are rejected and the weights recomputed until the set settles; the best k are kept. Every star's differential flux is f(t)/A(t), with A−i (leave-one-out) for comparison stars. Frames where A(t) < 0.25 (heavy cloud) or most comparisons are unusable are rejected.
Least-squares fit of the chosen baseline (constant, linear or quadratic in time, or linear in airmass) with iterative 3σ clipping, divided out, re-normalised to unit median. Refused if the trend would leave [0.5, 2] over the data.
Each (star, frame) carries a bit mask: edge / no-data in the aperture (1), saturated pixel within the largest aperture (2) — located on the unbinned frame from MAXLIN/SATURATE or a clipped-ADC plateau, since binning averages a clipped core away — rejected frame (4), isolated outlier (8), invalid flux (16), bad sky (32). Outliers are points more than 5σ from the median of their two neighbours on each side: a linear ramp such as ingress has zero residual against that median, so steep eclipse branches are never clipped.
Box search. For trial durations D from 0.5 to 5 h and centres across the night, the model y = B·c + δ·box is solved by least squares (B = the detrend baseline), all trials at once from cumulative sums. The best box per duration is re-scored with red noise measured on the residuals of that model (box included, so a real dip does not inflate its own noise):
σw is the point-to-point (white) noise and σbin(D) the RMS of the residuals averaged in bins of length D (Pont, Zucker & Queloz 2006).
Variability. The von Neumann ratio η = δ²/s² of the baseline residuals is ≈ 2 for white noise and falls toward 0 for smooth variability; its significance is z = (2 − η)·√N / 2.
The model is a quadratic limb-darkened star occulted by an opaque disc, I(μ) = 1 − u1(1 − μ) − u2(1 − μ)², integrated over the occulted arcs with end-clustered Gauss–Legendre quadrature (exact to 4·10−13 for a uniform disc; agrees with brute-force 2-D integration to the grid's resolution). Circular or eccentric orbits (Kepler's equation solved per point); the model is averaged over the exposure when an exposure is a significant fraction of ingress. Systematics multiply the transit:
reported in EXOTIC's convention a1 = c0e−a2X0. Starting point: a Tc grid scan, then bounded least squares. Priors: Tc uniform within max(10σpred, ½T14, 1 h) of the prediction; Rp/R* uniform; inclination within ±5° (Gaussian if the archive gives an error); a/R* fixed or Gaussian; b < 1 + Rp/R*. Errors are scaled by √χ²red (never down) and by the time-averaging red-noise factor β (Winn et al. 2008, bins of 10–30 min), then the posterior is sampled with the Goodman & Weare (2010) affine-invariant ensemble sampler; medians and 16/84th percentiles are reported.
Automatic systematics. Before the full fit, each systematics model (none, airmass, linear, airmass + linear, quadratic) gets a least-squares transit fit on the same points. A point that is an outlier under any model is left out of all of them, so the χ² values compare. The model is chosen by
the criterion AstroImageJ uses for its detrend parameters. k is the number of free parameters, and s² scales the errors so the most flexible model has χ²red = 1 (never scaled down). With red noise the photometric errors are too small, and every extra term would otherwise look significant. Within ΔBIC 2 of the lowest, the model with the fewest terms wins: a term has to earn its place. Time trends are only offered when there's out-of-transit baseline on both sides of the transit (at least max(5, 10% of the points) each). With baseline on one side only, a slope trades against the depth. The summary lists every model's ΔBIC and marks the winner. If the winner isn't airmass, the AAVSO report's notes name the model; DETREND_2 is the fitted systematics in every case.
Synthetic check (simulated only), on a night shaped like a WASP-12 b observation: −4 to +5 h around the transit, 4-min cadence, 2.2 ppt noise, meridian-centred airmass, 20 noise draws per case. A flat baseline chose none 20/20 times; an airmass extinction term chose airmass 20/20; a 4 ppt linear drift chose linear 20/20. On that drifting night the airmass-only fit put Tc 1.4 min early on average, with 58% of the true Tc values inside its 1σ errors. Auto put it 0.1 min early, with 92% inside 1σ (12 draws). Runs ending mid-transit never got a time trend.
Frequency grid from 1/baseline to Nyquist:
Via astropy's LombScargle.autopower with configurable samples-per-peak density (default 10). Peak period marked on the display. Best for sinusoidal variability — pulsators, eclipsing binaries at frequency-doubled signatures, rotational signals.
Box Least Squares is where the real transit search happens. The pipeline:
This removes slow trends in the periodogram baseline that would otherwise dominate SDE calculations.
with tolerance τ = 0.02 (within 2% of an alias).
The best SDE_adj across all candidates wins. This is the design that prevents the "every ground-based BLS peaks at 1.0 day" problem — a true planetary signal at some real period beats a 1-day sidereal alias even if the raw BLS power at 1.0 day happens to be slightly higher.
At the chosen period P and epoch t0, fold to [-0.5, +0.5]:
The plot is in hours from mid-transit, φ·P·24, with the fitted Tc as the epoch. The data come from the raw target/ensemble ratio:
Odd/even test (the Kepler vetting test). Every transit epoch with at least 3 points in transit counts. The fitted shape s(t) = 1 − T(t) is kept, and only a depth scale is fitted, separately for each transit. This is linear least squares, a = Σw(1−y)s / Σws², so partial transits count.
Synthetic check, injected into three quiet NGC660 stars on the real timestamps, folded at half the binary's period:
Bins are 10 minutes. For a transit shorter than 50 minutes they shrink to T14/5, but never below two exposures. Each bin is the inverse-variance mean with its propagated error, inflated when the bin scatters more than its errors (the Fit Transit binning). The BLS box is drawn dashed, centred where BLS put it. If the fit finds no transit (b ≥ 1 + Rp/R*, or Rp/R* < 0.003), the fold shows the BLS input and the box only, and says so.
Independent of BLS, a per-night dip detector segments the light curve by observational gaps (default > 0.2 days):
where OOT is out-of-transit (segment median of the smoothed curve). Required to be > max(2σsegment, 0.0008). Transit-shaped dips (down then up) get event entries. Reports per-event center time, depth, SNR, and duration. The summary line in the Analyze window reports the count — if your "candidate" shows 0 night-dip events but has a strong BLS peak, that peak is probably an alias; if it shows 5 events across 5 nights at consistent timing, you've got something real.
For color inputs, a secondary photometry pass runs the same measurement (tracked per-frame positions, the chosen aperture radius, clipped annulus sky, flags) on each R, G, B channel separately; flagged measurements are left empty. A "color" set whose three channels are identical is mono stored as RGB and is treated as mono. The result is a 3D array raw_flux_rgb shaped (3, n_stars, n_frames) with corresponding errors. Both are set to None when the input is mono, and the AAVSO exporter falls through to single-band mode.
When ≥3 comparison stars have catalog magnitudes in the target band, compute a per-frame ensemble zero point:
Target magnitude:
The comparison set is first MAD-clipped (robust 3σ on each star's run-median ZP, with a 0.05 mag floor to prevent over-clipping tight ensembles): comparison stars with discrepant catalog magnitudes get dropped before the per-frame ZP is computed. SEM per frame:
Final MERR combines target instrumental uncertainty, ZP SEM, and a systematic floor:
Default floor is 0.10 magnitudes — a defensive estimate of unmodeled systematics (color terms, atmospheric variations, aperture scatter). Can be reduced to 0.05 or 0.0 if you've characterized your rig and know your actual systematic contribution. The ensemble zero point approach is standard practice for professional transit surveys and gives photometric accuracy within 0.01-0.03 magnitudes under good conditions, limited mainly by catalog magnitude accuracy.
When only 1-2 comparison stars have catalog magnitudes, pick the brightest (highest median flux — best SNR, most stable anchor):
Error propagated through both flux measurements plus systematic floor. The AAVSO row's CNAME field points at the chosen comparison; KMAG field holds the independent check-star value for post-upload sanity checking.
Last resort when no comparison stars have catalog magnitudes in the target band. The check star doubles as the comparison. CNAME points at the check star, KMAG field is "na" because there's no independent check anymore. The NOTES field documents the tier used so a reviewer can see exactly what was done.
Variable-star otype prefixes get +100 to the match score:
Named catalog designations get +30:
Generic Gaia designations get -30:
Angular offset is subtracted (closer wins). This solves a real problem: without scoring, SIMBAD's "nearest match" would often return a Gaia DR3 identifier for a star that's actually catalogued as, say, V336 Aps — Gaia has an entry for literally everything, and a plain nearest-neighbor return pollutes the exported #NAME field. The scoring plus the VSX fallback produces the right answer (the variable-star designation) when one exists.
Both SEP detection (pass 1) and aperture photometry (pass 2) run in parallel across a thread pool sized to 80% of available CPU cores. SEP itself is single-threaded internally so this gives real linear speedup. Per-frame tasks are completely independent (no shared state), so there's no lock contention. On an 8-core machine, a 200-frame session processes in roughly the time it takes one frame × 32 — a 6× speedup over serial execution.