A specialized binning scheme for eclipsing binary star light curves
Project description
Binning Eclipsing Binary Star Light Curves
Overview
This Python package provides a specialized binning scheme designed to more effectively capture the features of eclipsing binary star light curves. Unlike traditional uniform binning (middle panel), which can dilute the crucial details of eclipses, this non-uniform binning method (right panel) prioritizes the accurate representation of eclipse events.
Key Features
-
Eclipse-Focused Binning: The binning algorithm identifies the eclipse phases and allocates up to half of the total bins to these critical periods. The remaining bins are distributed across the out-of-eclipse regions.
-
Optimized Data Distribution: Using the
pandas qcutfunction, the package ensures that each bin within the eclipse and out-of-eclipse segments contains approximately the same number of data points, maintaining the integrity of the light curve's structure. -
Enhanced Accuracy: By concentrating bins around the brief, narrow eclipse phases, the method improves the resolution of these events, which are essential for deriving accurate parameters of the binary system.
Why Use This Binning Scheme?
Eclipses in binary star systems contain vital information about the system's properties, such as the relative sizes, masses, and orbital parameters of the stars. Standard uniform binning can obscure these details, especially when the eclipse duration is short relative to the orbital period. This package mitigates that issue by adaptively placing more bins where they matter most—during the eclipses—thereby preserving the fidelity of the light curve and improving the subsequent analysis.
How it Works
-
Eclipse Detection: The package first identifies the primary and secondary eclipse phases. The primary eclipse is located by finding the minimum flux, and the secondary eclipse is located by finding the minimum flux at least 0.2 phase units away from the primary eclipse.
-
Eclipse Boundaries: The package defines the boundaries of the eclipses as the points where the flux returns to 1.0 flux units, or the closest point to 1.0 flux units if the flux does not return to 1.0.
-
Bin Groups: The package then groups the data into four segments: the two eclipse regions and the two out-of-eclipse regions. A specified fraction of the total number of bins is split between the eclipse regions, and the remaining bins are split evenly between the out-of-eclipse regions.
-
Binning: The package then uses the
pandas qcutfunction within each group to bin the data into a specified number of bins. This function bins the data such that there are an approximately equal number of points within each bin for the given group. -
Plotting: The package also provides a function to plot the binned and unbinned light curves, marking the eclipse boundaries with vertical lines.
Getting Started
To start using the package, install it via pip:
pip install eclipsebin
Usage
import eclipsebin as ebin
# Example usage
binner = EclipsingBinaryBinner(phases, fluxes, fluxerrs, nbins=200, fraction_in_eclipse=0.2)
bin_centers, bin_means, bin_stds = binner.bin_light_curve(plot=True)
Refer to the documentation for more detailed usage instructions and examples.
Contributing
Contributions are welcome! Please refer to the Contributing Guide for guidelines on how to help improve this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. 2206744 & DGE 2146752. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eclipsebin-0.1.8.tar.gz.
File metadata
- Download URL: eclipsebin-0.1.8.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c29c68232e38f70df6d34c79c2f77ca6787b4bb538b6b69076ca12a68acb78e
|
|
| MD5 |
3afd5c06c18dccf88e4a83491f5a18a3
|
|
| BLAKE2b-256 |
d3f53e69de26f9f8c522ce67bf010ff4a1adc01ac16775d704d1ab21a8ca5fdd
|
File details
Details for the file eclipsebin-0.1.8-py3-none-any.whl.
File metadata
- Download URL: eclipsebin-0.1.8-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdd6045eb62fd3c6aff37a85dd5e3182782da63d0c7dde71c9bd1b17201ccba8
|
|
| MD5 |
05b12f3c442a1f266b62e8af247dfd11
|
|
| BLAKE2b-256 |
22f2063bf7e680033723eb06ce498be20cfe96bc9f3645e0b6f26a7692ba5a84
|