A neural network model for quickly solving multiple-band light curves of contact binaries
This software employs a neural network model trained on theoretical light curves generated by PHOEBE to analyze multi-band light curves of contact binary stars and efficiently determine their physical parameters. The model has been compiled into a Windows executable file (.exe). Users are advised to read this guide carefully before use.
Determinable Physical Parameters:
• Temperature ratio (T₂/T₁)
• Mass ratio (q)
• Orbital inclination (i)
• System potential (Ω)
• Contact degree (f)
• Component luminosities (L₁, L₂)
• Relative radii (r₁, r₂)
• Third light flux (l₃)
• Spot parameters

Input Data Specifications:
Light curve data should be provided in CSV format and stored in the "Input Data" directory. Filenames should correspond to their respective bandpasses (naming conventions should follow the "bandpass.txt" file). Each CSV file must contain two columns:  phase (column header: "Phase") and normalized flux (column header: "Flux").

Parameter Configuration:
The "Par_input.csv" file is used to define the input physical parameters: q: Mass Ratio, t1: Primary Temperature, incl: Orbital Inclination, t2_t1: Secondary-to-Primary Temperature Ratio, f: Degree of Contact, colat: Spot Colatitude, long: Spot Longitude, radius: Spot Angular Radius, relteff: Spot Relative Temperature, l3: Third Light Flux. Parameters to be optimized should be marked "-1", while fixed parameters should be assigned their respective numerical values.
Note: Spot is by default placed on the primary component. If the phase is transformed using the secondary minimum, spot is placed on the secondary component instead. If no spots are present, "relteff" must be fixed at 1, and other spot-related parameters can be set to 0.

MCMC Parameter Search:
A two-stage Markov Chain Monte Carlo (MCMC) process is employed for parameter search. The parameter search ranges, number of walkers, and iterations are all configured in the "data.json" file.

Output Results:
"Par_output.csv": Final determined physical parameters and their errors (the last column indicates the goodness-of-fit).
"step1.h5" and "step2.h5": Data files containing the MCMC chain information from the two stages.
"lc.png": Image of the fitted light curves.
"LC_theoretical_**.csv": Theoretical light curve data.
"Residual_**.csv": Fitting residuals.
"step2_corner.png": Corner plot generated using the "step2.h5" file.
"MCMC_result.csv": All physical parameter values output from each iteration of the second MCMC stage.

Additional Notes:
Third Light Parameter Interpretation: In the output results, "band_l3" represents the flux value of the third light, while "band_l1" and "band_l2" represent the relative luminosities of the primary and secondary components, respectively. To calculate the fraction of the third light to the total light, use the following formula: l3(fraction) = (l3 × 4π) / (l1 + l2 + l3 × 4π)
Mass Ratio Constraint Handling: Since the mass ratio is constrained to the range [0, 1], two separate analyses must be performed: 1. Phase transformation using the primary minimum. 2. Phase transformation using the secondary minimum. The result with the better goodness-of-fit is selected as the final result. In both cases, the flux normalization should be performed by setting the flux at phase 0.25 as unity.
If you use our software, please cite the following paper "A Neural-network Model for Quickly Solving Multiple-band Light Curves of Contact Binaries" (2025, ApJS, 281, 1. https://doi.org/10.3847/1538-4365/ae064c).