A single toolkit for calibrations, correlations, and companion search for kernel phase, aperture masking, and long-baseline interferometry data.
This toolkit combines different pieces of code that I developed mainly during my PhD. The major ideas come from CANDID and pynrm. Collaborators include Antoine Merand, Mike Ireland, Frantz Martinache, Tomas Stolker, and Thomas Vandal. The ultimate purpose is a common framework to analyze and fit kernel phase, aperture masking, and long-baseline interferometry data. At the moment, a major focus lies on JWST/NIRCam & JWST/NIRISS kernel phase and JWST/NIRISS aperture masking interferometry.
Currently, the toolkit contains the following functionalities:
Future updates will include:
There are several tutorials and test data sets provided that can be used to test and explore the functionalities of the fouriever toolkit. We note that the toolkit does currently understand OIFITS files and kernel phase FITS files. The following test data sets are provided:
AX Cir, with correlations and bandwidth smearing.
Opened PIONIER_Pnat(1.6135391/1.7698610) data
50 observations
6 baselines
4 triangles
3 wavelengths
Selected instrument = PIONIER_Pnat(1.6135391/1.7698610)
Use self.set_inst(inst) to change the selected instrument
Selected observables = ['v2', 'cp']
Use self.set_observables(observables) to change the selected observables
Chi-squared map and model vs. data plot:
Data properties
Smallest spatial scale = 2.0 mas
Bandwidth smearing FOV = 34.9 mas
Diffraction FOV = 221.9 mas
Largest spatial scale = 34.9 mas
Bandwidth smearing = 3
Using data covariance = True
WARNING: covariance matrix does not have full rank
Computing best fit uniform disk diameter (DO NOT TRUST UNCERTAINTIES)
Best fit uniform disk diameter = 0.93084 +/- 0.00048 mas
Best fit red. chi2 = 0.811 (ud)
Computing grid
Min. sep. = 2.0 mas
Max. sep. = 41.7 mas
1352 non-empty grid cells
Computing chi-squared map (DO NOT TRUST UNCERTAINTIES)
Cell 1849 of 1849
1121 unique minima found after 1352 fits
Optimal step size = 2.0 mas
Current step size = 2.0 mas
Best fit companion flux = 0.937 +/- 0.053 %
Best fit companion right ascension = 6.3 +/- 0.1 mas
Best fit companion declination = -28.5 +/- 0.1 mas
Best fit companion separation = 29.2 +/- 0.1 mas
Best fit companion position angle = 167.6 +/- 0.1 deg
Best fit uniform disk diameter = 0.81562 +/- 0.00776 mas
Best fit red. chi2 = 0.589 (ud+bin)
Significance of companion = 8.0 sigma
MCMC chains and posterior:
Computing best fit uniform disk and companion parameters (UNCERTAINTIES FROM MCMC)
Bandwidth smearing = 3
Using data covariance = True
WARNING: covariance matrix does not have full rank
Covariance inflation factor = 0.589
This may take a few minutes
100%|███████████████████████████████████████| 5000/5000 [03:05<00:00, 27.01it/s]
Best fit companion flux = 0.934 +/- 0.040 %
Best fit companion right ascension = 6.2 +/- 0.1 mas
Best fit companion declination = -28.5 +/- 0.1 mas
Best fit companion separation = 29.2 +/- 0.1 mas
Best fit companion position angle = 167.7 +/- 0.1 deg
Best fit uniform disk diameter = 0.81599 +/- 0.00734 mas
Best fit red. chi2 = 0.589 (ud+bin)
Significance of companion = 8.0 sigma
Chi-squared map and model vs. data plot of residuals:
Subtracting ud_bin model
Data properties
Smallest spatial scale = 2.0 mas
Bandwidth smearing FOV = 34.9 mas
Diffraction FOV = 221.9 mas
Largest spatial scale = 34.9 mas
Bandwidth smearing = 3
Using data covariance = True
WARNING: covariance matrix does not have full rank
Computing best fit uniform disk diameter (DO NOT TRUST UNCERTAINTIES)
Best fit uniform disk diameter = 0.81601 +/- 0.00046 mas
Best fit red. chi2 = 0.589 (ud)
Computing grid
Min. sep. = 2.0 mas
Max. sep. = 41.7 mas
1352 non-empty grid cells
Computing chi-squared map (DO NOT TRUST UNCERTAINTIES)
Cell 1849 of 1849
1283 unique minima found after 1352 fits
Optimal step size = 2.0 mas
Current step size = 2.0 mas
Best fit companion flux = 0.414 +/- 0.013 %
Best fit companion right ascension = -20.1 +/- 0.3 mas
Best fit companion declination = -20.5 +/- 0.3 mas
Best fit companion separation = 28.7 +/- 0.3 mas
Best fit companion position angle = -135.4 +/- 0.6 deg
Best fit uniform disk diameter = 0.75897 +/- 0.00222 mas
Best fit red. chi2 = 0.546 (ud+bin)
Significance of companion = 2.4 sigma
Detection limits of residuals using Absil and Injection method:
Subtracting ud_bin model
Data properties
Smallest spatial scale = 2.0 mas
Bandwidth smearing FOV = 34.9 mas
Diffraction FOV = 221.9 mas
Largest spatial scale = 34.9 mas
Bandwidth smearing = 3
Using data covariance = True
WARNING: covariance matrix does not have full rank
Computing best fit uniform disk diameter (DO NOT TRUST UNCERTAINTIES)
Best fit uniform disk diameter = 0.81601 +/- 0.00046 mas
Best fit red. chi2 = 0.589 (ud)
Computing grid
Min. sep. = 2.0 mas
Max. sep. = 41.7 mas
1352 non-empty grid cells
Computing detection limits (3-sigma)
Cell 1849 of 1849