{ "cells": [ { "cell_type": "raw", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 1: Understanding the Properties Configuration\n", "\n", "Let's examine the properties.yaml file and understand what each parameter does. This configuration file controls every aspect of SHERLOCK's behavior." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Create an annotated version of the properties file with detailed explanations\n", "```bash\n", "# ============================================================================\n", "# SHERLOCK PROPERTIES FILE - DETAILED EXPLANATION\n", "# ============================================================================\n", "\n", "# TARGET SPECIFICATION\n", "# -------------------\n", "TARGETS:\n", " TIC 305048087: # TESS Input Catalog ID - the star we want to analyze\n", " # SHERLOCK will automatically download light curve data\n", " # from TESS for this target\n", " SECTORS: [2] # The sectors data to download for the selected target\n", "\n", "# DETRENDING CONFIGURATION\n", "# -----------------------\n", "AUTO_DETREND_ENABLED: False # Disable automatic detrending of stellar variability\n", " # Set to True for fast rotators or variable stars\n", " # CAUTION: Can remove real transit signals!\n", "\n", "INITIAL_HIGH_RMS_MASK: False # Don't apply initial high-RMS masking\n", " # When True, masks high-noise regions in short cadence data\n", "\n", "INITIAL_SMOOTH_ENABLED: True # Apply Savitzky-Golay smoothing filter\n", " # When True, applies initial smoothing to short cadence data\n", "\n", "INITIAL_HIGH_RMS_THRESHOLD: 2.0 # Threshold multiplier for high-RMS detection\n", " # Areas with RMS > threshold*median_RMS are masked\n", "\n", "SIMPLE_OSCILLATIONS_REDUCTION: False # Don't reduce stellar oscillations\n", " # Useful for asteroseismology targets\n", "\n", "INITIAL_MASK: # No initial time ranges to mask\n", " # Format: [start_time, end_time] in TESS time\n", "\n", "# COMMENTED TRANSIT MASK EXAMPLE:\n", "# INITIAL_TRANSIT_MASK: # Mask known transits to search for additional planets\n", "# - P: 5.433729 # Period in days\n", "# T0: 1355.24981 # Transit epoch (TESS time)\n", "# D: 120 # Transit duration in minutes\n", "\n", "# DATA SELECTION\n", "# -------------\n", "EXPTIME: [120] # Use 2-minute cadence data (120 seconds)\n", " # Options: [120] for short cadence, [1800] for long cadence\n", "\n", "# COMMENTED AUTHOR FILTERS:\n", "# AUTHOR: [Kepler] # Use only Kepler mission data\n", "# AUTHOR: TESS-SPOC # Use only TESS-SPOC pipeline data\n", "\n", "# PROCESSING PARAMETERS\n", "# --------------------\n", "DETRENDS_NUMBER: 10 # Number of detrend models to create\n", " # More models = better systematics removal but slower\n", " # Typical range: 5-12\n", "\n", "DETREND_CORES: 6 # CPU cores for parallel detrending\n", " # Should not exceed your system's core count\n", "\n", "CPU_CORES: 6 # CPU cores for main processing\n", " # Adjust based on your system capabilities\n", "\n", "MAX_RUNS: 2 # Maximum number of transit search iterations\n", " # Each run searches for the strongest remaining signal\n", " # Higher values find more planets but increase false positives\n", "\n", "# DETECTION THRESHOLDS\n", "# -------------------\n", "SNR_MIN: 5 # Minimum Signal-to-Noise Ratio for detection\n", " # Lower values = more sensitive but more false positives\n", " # Typical range: 5-8\n", "\n", "SDE_MIN: 5 # Minimum Signal Detection Efficiency\n", " # Statistical significance threshold\n", " # SDE > 5 corresponds to ~99.9% confidence\n", "\n", "# PERIOD SEARCH RANGE\n", "# ------------------\n", "PERIOD_MIN: 0.75 # Minimum orbital period to search (days)\n", " # Shorter periods may be affected by systematic noise\n", "\n", "PERIOD_MAX: 10 # Maximum orbital period to search (days)\n", " # Limited by observation baseline and transit probability\n", "\n", "# SIGNAL SELECTION\n", "# ---------------\n", "MIN_QUORUM: 0.333 # Minimum fraction of detrend models that must agree\n", " # Higher values = more conservative candidate selection\n", " # Range: 0.1 (liberal) to 0.8 (very conservative)\n", "\n", "# DATA PROCESSING\n", "# --------------\n", "TRUNCATE_BORDERS_DAYS: 0.5 # Remove data from sector edges (days)\n", " # Helps avoid systematic effects at sector boundaries\n", " # Typical range: 0.5-2.0 days\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 2: Running SHERLOCK with the Properties File\n", "\n", "Now let's execute SHERLOCK using our properties configuration. This will search for transit signals in the TIC 305048087 light curve." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "SHERLOCK Command:\n", "\n", "`python3 -m sherlockpipe --properties properties.yaml`\n", "\n", "This command will:\n", "\n", "1. Download TESS data for TIC 305048087\n", "2. Create 10 different detrend models\n", "3. Search for transit signals in each model\n", "4. Apply quorum voting to select reliable candidates\n", "5. Generate comprehensive reports and plots" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/home/martin/anaconda3/envs/sherlock311/lib/python3.11/site-packages/lightkurve/config/__init__.py:119: UserWarning: The default Lightkurve cache directory, used by download(), etc., has been moved to /home/martin/.lightkurve/cache. Please move all the files in the legacy directory /home/martin/.lightkurve-cache to the new location and remove the legacy directory. Refer to https://docs.lightkurve.org/reference/config.html#default-cache-directory-migration for more information.\n", " warnings.warn(\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "...\n" ] } ], "source": [ "# Execute SHERLOCK search\n", "!python3 -m sherlockpipe --properties /home/martin/workspace/ph/SHERLOCK/docs/source/_static/properties.yaml > sherlock.log" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "results_dir = '/home/martin/workspace/TIC305048087_[2]'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examining Planet Candidates\n", "\n", "After running SHERLOCK, the tool searches for transit signals across multiple detrend models and identifies potential planet candidates. \n", "The list of resulting files should be something similar to:\n", "\n", "#### Directories:\n", "\n", "* **1/ and 2/**: These numbered directories contain results for each detection run. SHERLOCK performs multiple runs (based on MAX_RUNS in your properties.yaml), with each run focusing on finding additional signals after masking previously detected ones.\n", "* **detrends/**: Contains plots and data of the different detrending methods applied to the light curve. SHERLOCK creates multiple detrend models (10 in your case, as specified in properties.yaml).\n", "* **flux_diff/**: Includes visualizations showing the difference in flux between pixels to help identify source contamination.\n", "* **fov/**: Contains \"Field of View\" images showing the target star and nearby stars that might contaminate the signal.\n", "* **periodicity/**: Contains periodogram analysis results to identify periodic signals in the data.\n", "* **tpfs/**: Target Pixel Files directory with pixel-level data and visualizations.\n", "\n", "#### Files:\n", "\n", "* **apertures.yaml**: Defines the photometric aperture(s) used for extracting the light curve.\n", "* **candidates.csv**: Summary table of all planet candidates detected across all runs, with their key parameters.\n", "* **lc_0.csv through lc_9.csv**: The 10 different detrended light curves (matching DETRENDS_NUMBER in your properties.yaml).\n", "* **lc.csv**: The original extracted light curve before detrending.\n", "* **lc_data.csv**: Comprehensive light curve data including quality flags and other metadata.\n", "* **params_star.csv**: Contains stellar parameters (radius, mass, temperature, etc.) used for planet characterization.\n", "* **properties.yaml**: A copy of the configuration file used for this analysis.\n", "* **TIC305048087_[2]_candidates.log**: Log file specifically for candidate detection information.\n", "* **TIC305048087_[2]_report.log**: The main report log with comprehensive analysis information.\n", "* **transits_stats.csv**: Statistical information about the detected transit signals.\n", "\n", "Below, we'll load and display the search results from the log file to examine what planet candidates were found during the detection process.\n", "\n", "The log shows important information for each candidate, including:\n", "- Period (days)\n", "- Transit depth (in parts per thousand)\n", "- Signal-to-noise ratio (SNR)\n", "- Signal detection efficiency (SDE)\n", "- Duration of the transit (minutes)\n", "- Border score (quality indicator)\n", "- Planet radius estimation (in Earth radii)\n", "- Habitability zone classification\n", "\n", "#### TIC305048087_[2]_candidates.log\n", "The content of the candidates log contains two lines for TOI-237.01 and TIC 305048087.02" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
Listing most promising candidates for ID TIC305048087_[2]:\n",
"Detrend no. Period Per_err Duration T0 Depth Depth_err Depth_sig SNR SDE Border_score Matching OI Harmonic Planet radius (R_Earth) Rp/Rs Semi-major axis Habitability Zone \n",
"10 5.4348 0.01703 69.69 1355.25 4.981 0.266 18.702 17.23 13.71 1.00 TOI 237.01 - 1.62846 0.07108 0.03424 I \n",
"8 1.7456 0.00337 49.36 1355.58 2.263 0.170 13.278 11.07 6.52 1.00 - 1.09763 0.04609 0.01606 I \n",
"\n",
" {log_content}\n",
"