Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firstguess with IFS data takes 12 days to run #578

Open
trisha-bhowmik opened this issue Mar 7, 2023 · 3 comments
Open

Firstguess with IFS data takes 12 days to run #578

trisha-bhowmik opened this issue Mar 7, 2023 · 3 comments

Comments

@trisha-bhowmik
Copy link

Hello,

I am trying to use the firstguess routine for the IFS data and it took 12 days to run. Is there a way to optimize the sub-routine?

@VChristiaens
Copy link
Contributor

Hi @trisha-bhowmik,

Could you clarify the input parameters you used for the firstguess routine? And whether your workflow differs from the one presented in Tutorial 7 (in particular Secs. 7.6 and 7.7)?

Assuming you haven't done so yet, I'd recommend to set imlib='opencv' when calling the function, after installing opencv (pip install opencv-python) in your environment.

Hoping this helps.

@trisha-bhowmik
Copy link
Author

trisha-bhowmik commented Mar 8, 2023 via email

@VChristiaens
Copy link
Contributor

Hi @trisha-bhowmik,
The call to the function looks good. However, could you clarify what is the workflow you're following, which ends up with 12 days computation time? In particular, how does it compare to the workflow presented in Tutorial 7 (mostly Secs. 7.6 and 7.7)? The relevant steps (considering simplex only; no MCMC) are summarized below:

  • Sec. 7.5.5: PCA-ASDI to identify potential point sources and their rough coordinates;
  • Sec. 7.6.1: Find the optimal number of principal components which achieves maximum SNR with PCA-ADI at these rough coordinates.
  • Sec. 7.6.2: Crop the original cube to only keep the 8 spectral channels achieving the highest SNR with PCA-ADI, then provide it to the firstguess function to infer the accurate astrometry of the companion. (Note 8 is arbitrary, this can be changed, but turned out to be a good compromise between computation time and accuracy for the IFS dataset and planet I considered in the tutorial).
  • Sec. 7.7.1: Run the firstguess function on the original data cube, by providing the accurate astrometry above as input with the planets_xy_coord parameter and setting force_rPA=True (i.e. fixing the position and only solving for the flux at each wavelength).

The above is more efficient than solving for all 3 parameters (r, PA, flux) individually for all spectral channels of the IFS cube, in case this happened to be what you tested. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants