5. CCF Test Functions¶
- pcassie.ccf_tests.inject_simulated_signal(sim_wave, sim_flux, R_p, R_star, multiple=1, verbose=False, **kwargs)[source]¶
Inject a simulated signal into the observed flux array. Both flux and sim_flux must be normalized.
- Parameters:
sim_wave (array) – Refer to pipeline.pipeline.
sim_flux (array) – Refer to pipeline.pipeline.
R_p (float) – Radius of the exoplanet. Units must be the same as R_star.
R_star (float) – Radius of the host star. Units must be tha same as R_p.
multiple (int) – Scalar multiple of the injection. E.g. if you want the injected signal to be 0.5x the scale of the expected planet signal, set
multiple=0.5.verbose (boolean) – Refer to utility_functions.debug_print.
**kwargs – Refer to pipeline.pipeline.
- Returns:
new flux array with injected signal
- Return type:
array
- pcassie.ccf_tests.sn_map(planet_frame_ccf, planet_frame_vgrid, Kp_range=array([50000., 51000., 52000., 53000., 54000., 55000., 56000., 57000., 58000., 59000., 60000., 61000., 62000., 63000., 64000., 65000., 66000., 67000., 68000., 69000., 70000., 71000., 72000., 73000., 74000., 75000., 76000., 77000., 78000., 79000., 80000., 81000., 82000., 83000., 84000., 85000., 86000., 87000., 88000., 89000., 90000., 91000., 92000., 93000., 94000., 95000., 96000., 97000., 98000., 99000., 100000., 101000., 102000., 103000., 104000., 105000., 106000., 107000., 108000., 109000., 110000., 111000., 112000., 113000., 114000., 115000., 116000., 117000., 118000., 119000., 120000., 121000., 122000., 123000., 124000., 125000., 126000., 127000., 128000., 129000., 130000., 131000., 132000., 133000., 134000., 135000., 136000., 137000., 138000., 139000., 140000., 141000., 142000., 143000., 144000., 145000., 146000., 147000., 148000., 149000., 150000.]), **kwargs)[source]¶
SNR map computation for the CCF.
- Parameters:
planet_frame_ccf (array) – 2d CCF array in the planet rest frame. Refer to pipeline.pipeline.
planet_frame_vgrid (array) – 1d velocity grid (km/s). Refer to pipeline.pipeline.
Kp_range (array) – Range of velocities in m/s to sample radial velocity amplitude Kp. Like
v_shift_rangeandplanet_frame_vgrid, ideal to have in steps of 1 km/s.**kwargs – Refer to pipeline.pipeline.
- Returns:
array – 2d grid of CCF values over the sampled radial velocity amplitude (Kp) vs. velocity shift space.
array – 2d S/N grid made by dividing the Kp vs. velocity shift grid by its the standard deviation of the out trail values.
- pcassie.ccf_tests.welch_t_test(Kp_range_ccf, zoom_radius=15)[source]¶
Performs Welch’s T-test to compare values in the CCF grid that may be associated with the planet with those that are not.
- Parameters:
Kp_range_ccf (array) – 2d Kp grid from ccf_tests.sn_map. Refer to ccf_tests.sn_map.
zoom_radius (int, optional) – Pixel space radius to build the in trail box around. Here, 1 pixel = 1 km/s (if you have your units right).
- Returns:
array – 2d Kp vs. velocity shift CCF grid for in trail values.
array – 2d Kp vs. velocity shift CCF grid for out trail values.
int – Welch’s T-test statistic comparing in trail and out trail CCF values.
int – Welch’s p value comparing in trail and out trail CCF values.
- pcassie.ccf_tests.find_max_sn_in_expected_range(sn_array, v_grid, offset=75, zoom_radius=15, **kwargs)[source]¶
Finds the maximum S/N value in the range of values expected of the planet.
- Parameters:
sn_array (array) – 2d S/N map from ccf_tests.sn_map.
v_grid (array) – 1d velocity range corresponding to
sn_array.offset (int, optional) – Valocity offset of the Kp range. E.g. if you were to sample a CCF from 75 km/s < Kp < 175 km/s, set
offset=75.zoom_radius (int) – Refer to ccf_test.welch_t_test.
**kwargs – Refer to pipeline.pipeline.
- Returns:
Maximum S/N value within the
zoom_radiusof the expected Kp and velocity shift values (expected v shift value in planet frame is 0).- Return type:
int