rzellem / EXOTIC

EXOplanet Transit Interpretation Code
Other
86 stars 45 forks source link

Issue 1316: Adding fortuitous variable stars to EXOTIC #1339

Open tamimfatahi opened 4 weeks ago

tamimfatahi commented 4 weeks ago

Leaving this as draft for now as I am running into some issues that I'd like some advice on. Here is the thought process of the code:

  1. Using the same comparison star used to determine the magnitude of the host star (original code), EXOTIC also uses it to determine magnitude of other variable stars in the field.
  2. Calculate the target's flux based on the same aperture and annulus of the comparison star.
  3. Calculate the airmass model and coefficients using ordinary least squares.
  4. Detrend and calculate the magnitude similarly to how EXOTIC calculates it currently for the variable star code.

Here are the issue I am running into:

After calculating the airmass model, it seems like the residuals are quite large and needs altering.

Here are the airmass plots for a variable star in the field: Variable_Airmass_Combined_422_380

Here it the predicted mag for the star ([VSX]()=14.86 - 15.67 V): Stellar_Variability_422_380

I thought the airmass plot code was off due to the model looking like the inverse. However, on a separate star from a different dataset, I got the following: Variable_Airmass_Combined_1508_452

where the magnitude was calculated as shown here (VSX=14.43+/-0.42 CV): Stellar_Variability_1508_452

Both are pretty off in their calculations of the magnitude. Any ideas what I could do differently?

pearsonkyle commented 4 weeks ago

Can you also show the relative flux on those plots?

It's not clear to me what you're fitting. The airmass model should be compared to the relative flux after dividing out the transit (or on the out of transit baseline) not the actual airmass. The airmass is just used as an input.