Exo-TiC / ExoTiC-ISM

This is a repository for the reduction pipeline detailed in Wakeford, et al., 2016, ApJ. The method implements marginalization across a series of models to represent stochastic models for observatory and instrument systematics. This is primarily for HST WFC3, however, may be extended to STIS in the future.
MIT License
8 stars 6 forks source link

Test run on Wasp17 data with the G102 grating #22

Closed ivalaginja closed 4 years ago

ivalaginja commented 5 years ago

We have both the data and the grid for the G102 grating for W17 available and we need to test whether this works.

hrwakeford commented 5 years ago

Testing G102 data run. Config_local changes:

[system_parameters]
grating = G102

[planet_parameters]
lightcurve_file = W17_G102_lightcurve_test_data.txt
wvln_file = W17_G102_wavelength_test_data.txt
epoch = 58021.4613
hrwakeford commented 5 years ago

Finding differences in the best systematic models and weights.

The rp/r* error is nearly double the IDL run.

The SDNR for the best models in the IDL run are on the order of 120 while the Python ones are around 140.

hrwakeford commented 5 years ago

I found a difference between the local IDL code being run for the comparative test and the set-up for the Python module. This difference is wrong in the IDL and has now been removed.

There are still small differences between the IDL run and the ExoTiC-ISM module - mostly in the marginalized models selected and in the uncertainty on the transit depth.

hrwakeford commented 5 years ago

It might be best to test the G102 and G141 modes on multiple planet datasets. I am attaching four more files two for each grism based on another planet WASP-39b published in Wakeford et al. (2018)

config.ini

[limb_darkening]
ld_model = 3D
metallicity = 0.01
Teff = 5485
logg = 4.453

;[planet_parameters] - make a new section for new data
[W39]
lightcurve_file = W39_G141_lightcurve_test_data.txt
wvln_file = W39_G141_wavelength_test_data.txt
rl = 0.1452
epoch = 57576.93 (G102) 57629.65 (G141)
inclin = 87.36
ecc = 0.0
omega = 0.0
Per = 4.055259
aor = 11.043

G102 files for W39 W39_G102_lightcurve_test_data.txt W39_G102_wavelength_test_data.txt

G141 files for W39 (note visit 1 from paper) W39_G141_lightcurve_test_data.txt W39_G141_wavelength_test_data.txt

ivalaginja commented 5 years ago

Just so that we have a baseline saved somewhere, here are some results with W17 and W39, both with G141 and G102, and for all of these four cases I just did a standard run and I did a run where I set the LevMar optimizer parameters ftol, xtol and gtol to machine precision (np.finfo(float).eps).

Changing these parameters had minimal effect on the results but made the code slower, not by much, but noticeably, and I don't think this would explain why there are differences between this and the IDL results.

I thought I'd try this since all of these three parameters have a default of 1.19209289551e-07 in Sherpa, but 1D-10 in IDL. Machine precision on the my machine is 2.220446049250313e-16.

Marginalized parameters G102:

G102_params

Statistics G102:

G102_sdnr

Marginalized parameters G141:

G141_params

Statistics G141:

G141_sdnr
ivalaginja commented 4 years ago

Closed with #82