Configuration
PREFACE uses four configuration classes to control pipeline behaviour. Each is
passed as a keyword argument to run_preface().
TelescopeConfigurations
Defines the observing instrument setup.
from preface.configs import TelescopeConfigurations
TelescopeConfigs = TelescopeConfigurations(
instrument="TNT ULTRASPEC",
filter_name="r",
run_mode="Half_Well",
toggle_sky_noise=True,
toggle_defocus=False
)
Parameter |
Type |
Description |
Valid Values |
Default |
|---|---|---|---|---|
|
|
Telescope or instrument name. |
Must correspond to a supported instrument. See |
required |
|
|
Photometric filter to be used. |
Must be valid for the selected instrument. See |
required |
|
|
Detector operating mode. |
|
required |
|
|
Include sky background noise in pipeline. |
|
|
|
|
Include telescope defocus effects when supported. |
|
|
Note
Some run modes and defocus calculations are instrument-specific. The pipeline will stop and report accordingly if an unsupported combination is detected.
OutputConfigurations
Defines the observation timing window, output directory, and ranking behaviour.
from preface.configs import OutputConfigurations
import datetime as dt
OutputConfigs = OutputConfigurations(
observation_start=dt.datetime(2025, 10, 1),
observation_end=dt.datetime(2026, 5, 31),
output_folder=r"C:\PREFACE_Output",
metric_mode="Rank",
viable_cumulative_cut=0.90,
toggle_graph_outputs=True,
event_weight_graph_threshold=0.75
)
Parameter |
Type |
Description |
Valid Values |
Default |
|---|---|---|---|---|
|
|
Start of observing period. |
Must precede |
required |
|
|
End of observing period. |
Must follow |
required |
|
|
Existing directory for generated outputs. |
Directory must already exist. |
required |
|
|
Event ranking metric. |
|
required |
|
|
Fraction of cumulative viability retained. |
Between |
|
|
|
Produce diagnostic plots per transit. |
|
|
|
|
Minimum event weight for graph generation. |
Non-negative ( |
|
MoonlightNoiseConfigurations
Controls optional moonlight background modelling.
from preface.configs import MoonlightNoiseConfigurations
MoonlightConfigs = MoonlightNoiseConfigurations(
toggle_moonlight_noise=True,
scattering_aod=0.2,
absorption_aod=0.3,
asymmetry_factor=0.6,
moonlight_amplification_factor=10
)
Parameter |
Type |
Description |
Valid Values |
Default |
|---|---|---|---|---|
|
|
Enable moonlight noise calculations. |
|
|
|
|
Atmospheric Mie scattering aerosol optical depth. |
Non-negative. |
|
|
|
Atmospheric absorption aerosol optical depth. |
Non-negative. |
|
|
|
Scattering asymmetry parameter. |
Between |
|
|
|
Empirical scaling controlling modelled moonlight influence. |
Positive value ≥ |
|
Note
Moonlight modelling currently supports only UBVRI and ugriz photometric filters, in addition to telescope-valid filters.
MultiprocessingConfigurations
Controls CPU utilization during Phase Two multiprocessing.
from preface.configs import MultiprocessingConfigurations
MultiprocessingConfigs = MultiprocessingConfigurations(
toggle_multiprocessing=True,
cores_to_leave_out=2
)
Parameter |
Type |
Description |
Valid Values |
Default |
|---|---|---|---|---|
|
|
Enable multiprocessing. |
|
|
|
|
Number of logical CPU cores reserved from computation. |
Integer ≥ |
|
Warning
By default, one logical CPU core is reserved to maintain system
responsiveness. Setting cores_to_leave_out=0 uses all available cores
and may cause the system to become unresponsive. PREFACE will prompt
for confirmation before continuing in this case.