Write the transit search and vetting program for a space-photometry follow-up group (period, epoch, depth, duration, planet candidate vs eclipsing binary vs blend vs nothing) from stitched archive light curves; it is scored on further light curves with known content.
harbor run -t reactive-labs/transit-vettingharbor download reactive-labs/transit-vettingYou are Noor Halvorsen, postdoc in the PIPIT Follow-up Working Group (PFWG) at the Hallowmere Institute for Astronomy. PIPIT is a small photometry satellite; the group searches the light curves of stars the Science Office sends for periodic transit-like events and vets them before telescope time is spent. Tomasz Brandl, who did this with a quicklook script, left in September. Edda Kristoffersen, the group lead, wrote to you on 20 October 2026:
First the October list itself. The 44 exports from the Science Office are in archive/, one folder per star. I need the SOP-004 record for each of them for the FUDB load.
Second, and more important: I do not want another hand-made list. Liesbeth's office will send 150 to 200 stars a month from November, so write it as a program that takes one export folder and writes the record, and that I can run unattended on whatever they send. Before I let anything write to FUDB, Ruben will run it on the injection-and-recovery set he made with the SOC end-to-end simulator and compare with what was put in.
In /app/inputs:
archive/: 44 folders PIC_<id>/, each with the stitched light curve PIC_<id>_lc.csv and the catalogue
cone search PIC_<id>_cone.csv as exported by the PIPIT Mission Archive, and MANIFEST.csvmission_docs/: the PIPIT Data Products Handbook v2.3, Data Release Notes DRN-01 to DRN-05, the mission
event table spacecraft_events.csv and an extract of the operations shift logpfwg/: PFWG-SOP-004 revision D (the group's vetting procedure), the email thread with Edda and Ruben
Achterberg, and what Tomasz left: his handover notes, quicklook_bls.py and his September sheet/app/output/vet.py, run as
python3 /app/output/vet.py <star_dir> <out.json>
<star_dir> is one export folder in the same format as those in archive/ (one *_lc.csv and one
*_cone.csv; the folder may be read-only). The program writes <out.json>, a JSON object with exactly these
keys:
| key | value |
|---|---|
disposition |
"NONE", "PC", "EB" or "BLEND", as SOP-004 defines them |
period_d |
orbital period, days |
epoch_pjd |
mid-time of a primary event inside the time span of the light curve, BJD_TDB - 2460000 |
depth_ppm |
depth of the primary event on the target star, parts per million (SOP-004 section 4.2) |
duration_h |
first-to-fourth-contact duration of the primary event, hours (SOP-004 section 4.1) |
For NONE the four numbers are null. For BLEND give depth_ppm as a number or null; it is not used.
Python 3.12 with the standard library, numpy 2.1.3, scipy 1.14.1 and pandas 2.2.3; no network. The program may
load files that you put next to it in /app/output (find them relative to __file__); nothing else from
this machine will be there when Ruben runs it. Each star must finish within 120 seconds of wall-clock time on
one CPU core of a shared, often busy machine (a run over the limit scores 0 for that star) and within 4 GB of
memory.
/app/output/results.csv: the records of the 44 stars in archive/, one row per star, with the header
pic_id,disposition,period_d,epoch_pjd,depth_ppm,duration_h (pic_id is the number; empty fields where the
JSON would have null).
Ruben runs vet.py on further light curves from the same instrument and archive: his injection-and-recovery
set, in which stars drawn from all 26 sectors carry a transiting planet, an eclipsing binary, an eclipsing system
on a neighbouring star, or nothing, and for which the simulator's truth is known. results.csv is compared in
the same way with the truth for the 44 archive stars. The reward is 0.8 times the score on the further light
curves plus 0.2 times the score of results.csv; each is a weighted mean over stars in which a star with
nothing in it counts half as much as a star with an event.
Score of one star:
Nothing in the star: 1 if the disposition is NONE, otherwise 0.
An event in the star: 0 if the disposition is NONE, if the program fails or runs out of time, or if period,
epoch or duration is missing or not finite (a missing depth loses only the depth part). Otherwise
| part | weight | weight when the truth is a blend |
|---|---|---|
| disposition, exact match | 0.30 | 0.35 |
| period | 0.25 | 0.30 |
| epoch, multiplied by the period score | 0.15 | 0.20 |
| depth, multiplied by the period score | 0.20 | not scored |
| duration, multiplied by the period score | 0.10 | 0.15 |
Each numerical part gets full credit when its error is within the tolerance and falls linearly to zero at three times the tolerance. With S the signal-to-noise ratio of the injected event series in that light curve (observed mid-event depth over the scatter of a 30-minute sample, times the square root of the number of valid 30-minute samples inside the events) and T14 the true duration: