Package: vip-hci
---------------------------------------------------
        oooooo     oooo ooooo ooooooooo.
         `888.     .8'  `888' `888   `Y88.
          `888.   .8'    888   888   .d88'
           `888. .8'     888   888ooo88P'
            `888.8'      888   888
             `888'       888   888
              `8'       o888o o888o
---------------------------------------------------
         Vortex Image Processing package
---------------------------------------------------IntroductionVIP is a python package for high-contrast imaging of exoplanets and circumstellar disks.
VIP is compatible with Python 3.8, 3.9, 3.10 and 3.11 (Python 2 compatibility dropped with VIP 0.9.9, and Python 3.7 compatibility dropped with VIP 1.4.3).The goal of VIP is to integrate open-source, efficient, easy-to-use and
well-documented implementations of high-contrast image processing algorithms to
the interested scientific community. The main repository of VIP resides onGitHub, the standard for scientific
open source code distribution, using Git as a version control system.Most of VIP’s functionalities are mature but
it does not mean it is free from bugs. The code is continuously evolving and
therefore feedback/contributions are greatly appreciated. Please refer tothese instructionsif you want to report
a bug, ask a question, suggest a new functionality or contribute to the code (the latter is particularly welcome)!DocumentationThe documentation for VIP can be found here:http://vip.readthedocs.io.Jupyter notebook tutorialTutorials, in the form of Jupyter notebooks, showcasing VIP’s usage and
other resources such as test datasets are available in theVIP-extrasrepository.In order to execute the notebook tutorials, you will have to download or clone the VIP-extras repository, and open each tutorial locally with jupyter notebook.Alternatively, you can execute the notebooks directly onBinder(in
the tutorials directory). The first (quick-start) notebook can be visualized
online withnbviewer.
If you are new to the Jupyter notebook application check out thebeginner’s guide.TL;DR setup guide$pipinstallvip_hciInstallation and dependenciesThe benefits of using a Python package manager (distribution), such as
(ana)conda, are many. Mainly, it brings easy and robust package
management and avoids messing up with your system’s default python. An
alternative is to use package managers like apt-get for Ubuntu or
Homebrew/MacPorts/Fink for macOS. We recommend usingMiniconda.VIP depends on existing packages from the Python ecosystem, such asnumpy,scipy,matplotlib,pandas,astropy,scikit-learn,scikit-image,photutilsand others. There are different ways of
installing VIP suitable for different scenarios.Before installing the package, it ishighly recommended to create a dedicated
conda environmentto not mess up with the package versions in your base
environment. This can be done easily with (replacevipenvby the name you want
for your environment):$condacreate-nvipenvpython=3.10ipythonNoteInstalling ipython while creating the environment, as in the example above, will
avoid a commonly reported issue which stems from trying to import VIP from
within a base python2.7 ipython console.For users not planning to contribute:Once within your new environment, the easiest way to install VIP is
through the Python Package Index, akaPyPI, with
thepippackage manager. Simply run:$pipinstallvip_hciWithpipyou can easily uninstall, upgrade or install a specific version of
VIP. For upgrading the package, run:$pipinstall--upgradevip_hciFor potential contributors:If you plan to contribute or experiment with the code you need to make a
fork of the repository (click on the fork button in the top right corner) and
clone it:$gitclonehttps://github.com/<replace-by-your-username>/VIP.gitIf you do not create a fork, you can still benefit from thegitsyncing
functionalities by cloning the repository (but will not be able to contribute):$gitclonehttps://github.com/vortex-exoplanet/VIP.gitTo install VIP, then simply cd into your local VIP directory, and run the installation in editable mode pointing to developer requirements:$cdVIP$pipinstall-e.-rrequirements-dev.txtIf cloned from your fork, make sure to link your VIP directory to the upstream
source, to be able to easily update your local copy when a new version comes
out or a bug is fixed:$gitaddremoteupstreamhttps://github.com/vortex-exoplanet/VIP.gitIf you plan to develop VIP or use it intensively, it is highly recommended to
also install the optional dependencies listed below.Optional dependenciesThe following dependencies are not automatically installed upon installation of VIP but may significantly improve your experience:VIP contains a classvip_hci.vip_ds9that enables, throughpyds9, the interaction with a DS9 window (displaying numpy arrays, controlling the display options, etc). To enable this feature,pyds9must be installed from the latest development version:pip installgit+git://github.com/ericmandel/pyds9.git#egg=pyds9VIP image operations (e.g. shifts, rotations, scaling) can be performed usingOpenCVinstead of the default FFT-based methods. While flux are less well preserved,OpenCVoffers a significant speed improvement (up to a factor 50x), in particular for image rotations, which can be useful to get quick results. Installation:pip installopencv-python.Also, you can install the Intel Math Kernel Library (mkl) optimizations (provided that you have a recent version ofconda) oropenblaslibraries. Either of them can be installed withconda install.VIP offers the possibility of computing SVDs on GPU by usingCuPy(starting from version 0.8.0) orPyTorch(from version 0.9.2). These remain as optional requirements, to be installed by the user, as well as a proper CUDA environment (and a decent GPU card).Bad pixel correction routines can be optimised withNumba, which  converts some Python code, particularlyNumPy, into fast machine code. A factor up to ~50x times speed improvement can be obtained on large images compared to NumPy. Numba can be installed withconda install numba.Finally, robust contrast curves and contrast grids can be calculated withapplefy(pip install Applefy). Example usage is provided inVIP tutorial 4. See more details inBonse et al. (2023).Loading VIPFinally, start Python (or IPython or a Jupyter notebook if you prefer) and check
that you are able to import VIP:importvip_hciasvipIf everything went fine with the installation, you should not get any error message upon importation, and you can start finding exoplanets!Image conventionsBy default, VIP routines are compatible with either even- or odd-dimension input frames. For VIP routines that require the star to be centered in the input images (e.g. post-processing routines involving (de)rotation or scaling), the code will assume that it is placed on (zero-based indexing):size/2-0.5 for odd-size input images;size/2 for even-size input images;i.e. exactly on a pixel in either cases. The VIP recentering routines will place the star centroid at one of these locations accordingly.ContactAnswers tofrequently asked questionsare provided in the relevant section of the documentation.
If you have an issue with VIP, please first check it is not detailed in the FAQ.
If you find a bug or experience an unreported issue in VIP, it is recommended to post a new entry in theIssues sectionon GitHub. Feel free to propose a pull request if you have already identified the source of the bug/issue.If you have a global comment, inquiry about how to solve a specific task using VIP, or suggestions to improve VIP, feel free to open a new thread in theDiscussionssection. The ‘Discussions’ section is also used to post VIP-related announcements and discuss recent/on-going changes in VIP.
Envisioned future developments are listed in theProjectssection. Contributions are very welcome!If you wish to be kept informed about major VIP updates and on-going/future developments, feel free to click the ‘watch’ button at the top of the GitHub page.AttributionVIP started as the effort ofCarlos Alberto Gomez Gonzalez,
a former PhD student ofPSILab(ULiege, Belgium), who has led the development of VIP from 2015 to 2020.
Maintenance and current development is now led byValentin Christiaens.
VIP benefitted from contributions made by collaborators from several teams, including: Ralf Farkas, Julien Milli, Olivier Wertz, Henry Ngo, Alan Rainot, Gary Ruane, Corentin Doco, Miles Lucas, Gilles Orban de Xivry, Lewis Picker, Faustine Cantalloube, Iain Hammond, Christian Delacroix, Arthur Vigan, Dimitri Mawet and Olivier Absil.
More details about the respective contributions are availablehere.Please citeGomez Gonzalez et al. (2017)andChristiaens et al. (2023)whenever
you publish data reduced with VIP (Astrophysics Source Code Library referenceascl:1603.003).
In addition, please cite the relevant publication(s) for the algorithms you use within VIP (usually mentioned in the documentation, e.g.Marois et al. 2006for median-ADI).