Firstguess with IFS data takes 12 days to run
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?
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.
Hi,
These are the input parameters I am using. Currently, I am not using the transmission in each frame to test first.
firstguess(cube, derot_angles, psfn, annulus_width=int(4*np.mean(fwhm)), aperture_radius=2, ncomp=1, fmerit=mode, planets_xy_coord=source_xy, fwhm=np.mean(fwhm), f_range=np.linspace(int(flx_min),int(flx_max),10), mu_sigma=False, imlib='opencv',simplex=True, plot=True, verbose=True)
flx_min=10 flx_max=70
mode='stddev'
On Tue, Mar 7, 2023 at 3:14 PM VChristiaens @.***> wrote:
Hi @trisha-bhowmik https://github.com/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 https://vip.readthedocs.io/en/latest/tutorials/07_ifs_psfsub_fm_planets.html#7.6.-Astrometry-retrieval (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.
— Reply to this email directly, view it on GitHub https://github.com/vortex-exoplanet/VIP/issues/578#issuecomment-1458618640, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASNUYI5JDDQGXJ2ZOKPC3DLW253I3ANCNFSM6AAAAAAVSVBF5Q . You are receiving this because you were mentioned.Message ID: @.***>
-- With Regards,
Dr. Trisha Bhowmik Postdoctoral fellow, Universidad Diego Portales, Santiago, Chile.
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
firstguessfunction 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
firstguessfunction on the original data cube, by providing the accurate astrometry above as input with theplanets_xy_coordparameter and settingforce_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.