This repository contains Python scripts and modules used to analyze polarization effects in interferometric observations with the CHARA Array, focusing on the MIRC-X and MYSTIC instruments. The analysis compares global and individual polarization models, estimates systematic errors, and visualizes model performance across wavelengths and baselines.
.
├── analyze_obs_durations.py # Prints max/min observing durations for MIRCX & MYSTIC
├── analyze_sys_error_mircx.py # Systematic error fitting for MIRCX
├── analyze_sys_error_mystic.py # Systematic error fitting for MYSTIC
├── plot_sys_error_fit_mircx.py # Apply sys err and plot modeled vs observed data (MIRC-X)
├── plot_sys_error_fit_mystic.py # Apply sys err and plot modeled vs observed data (MYSTIC)
├── mircxpol.py # Polarization modeling core module
├── plot_chi2_median_difference_heatmap.py # Heatmap comparing global vs individual χ² fits
├── plot_LiNbO3_misalignment.py # Δφ(λ) plots for MIRCX & MYSTIC
├── plot_instr_params_mircx.py # Instrumental parameter trends (MIRCX)
├── plot_instr_params_mystic.py # Instrumental parameter trends (MYSTIC)
├── plot_joint_residual_histograms.py # Histogram of residuals for MIRCX and MYSTIC
├── data_file/ # Directory for .npy/.npz residual and fit results
- Systematic Error Estimation: Estimates additive systematic error terms for each observable (vis ratio, diff phase, flux ratio).
- Global vs. Individual Models: Visualizes chi-square improvement for each baseline and parameter.
- Instrumental Parameters: Extracted as a function of wavelength and telescope arm.
- Differential Phase Modeling: Compared to birefringent plate model using Sellmeier equation.
- Residual Distributions: Compared across instruments and observables.
- Python ≥ 3.8
- numpy
- scipy
- pandas
- matplotlib
- seaborn
- astropy
Custom module:
mircxpol.py: Defines polarization model (matrix formalism)
This section outlines the full sequence for running the CHARA polarization model fitting and analysis.
- Estimate Systematic Errors
python analyze_sys_error_mircx.py # For MIRC-X (H-band)
python analyze_sys_error_mystic.py # For MYSTIC (K-band)- Apply Systematic Errors and Plot Fits
python plot_sys_error_fit_mircx.py # Visualize model fits for MIRC-X
python plot_sys_error_fit_mystic.py # Visualize model fits for MYSTIC- Plot Instrumental Parameters
python plot_instr_params_mircx.py # Wavelength-dependent ΔA² and Δψ (MIRC-X)
python plot_instr_params_mystic.py # Same for MYSTIC- Compare Residuals
python plot_joint_residual_histograms.pypython plot_chi2_median_difference_heatmap.pypython plot_LiNbO3_misalignment.pypython analyze_obs_durations.py