Package: exofile
ExofileTools to generate and access theexofile, a customized exoplanet archive.IMPORTANT:exofileis the name of a file and the name of this code (sorry for that). To distinguish between the two in the following text,exofile.ecsvwill be used for the file andexofilewill be used for the code.exofile.ecsvis based on theNASA exoplanet archivetables, but allows users to include custom parameters in the final table. Themasterfile.ecsvavailable athttp://www.astro.umontreal.ca/~adb/is based entirely on the NASA Exoplanet Archive tables (the name will be changed toexofile.ecsvfor this file as well in a future release).Thanks to for advices and corrections:Merrin PetersonCharles CadieuxTaylor BellAnne BoucherAlso thanks to my supervisors,David LafrenièreandRené Doyon!ConceptThe idea is to make the most complete table as possible.
Here is a scheme of the concept:Explanations
Two files can be load usingExoFile.load()DefaultTheComposite Planetary Systems Table, directly taken from the archive with minor formating.AlternativeThePlanetary Systems Tableis used to build aexofile_alt.ecsv. The references are sorted according to the error on the ephemeride at the present date (this could be changed or improved). All the values from the best reference are used iteratively to fill missing values in the table for the sake of consistency.The resulting file is calledexofile.ecsvorexofile_alt.ecsvand can be used directly. It is also possible to complement thisexofile.ecsvwith:a crowdsourcedgoogle sheeta local custom table (default isexofile_custom.csv).To do so, simply use the following code:fromexofile.archiveimportExoFiledata=ExoFile.load()# or ExoFile.load(use_alt_file=True) for the alternativedatais an instance ofExoFilewhich is inheriting fromastropy.table.Tableclass (so it has the same behaviour).NOTE: The Confirmed and Exteneded Planet Tables were retired from the archive
in August 2021. Versions of exofile using these tables are therefore out of
date.Installationexofileis available on PyPI. You can install the latest release withpython -m pip install exofileTo install the master branch from GitHub, simply clone the repository and install the project locally with pip.git clone https://github.com/AntoineDarveau/exofile.git
cd exofile
python -m pip install -U pip
python -m pip install -U .You can also install directly from github usingpython -m pip install -U "git+https://github.com/AntoineDarveau/exofile.git#egg=exofile".To installexofilefor development, it is recommended to use an isolated environment with a tool like conda, virtualenv or venv. Inside your environment, you can install following the steps above, but replacingpython -m pip install -U .bypython -m pip install -U -e ".[dev]". This will installexofilein editable mode (-e) and it will install the development dependencies.You can then useexofilewithimport exofile. See the notebook for examples.CustomizeYou can change the default parameters file. Take a look at the notebook for examples.What happened to masterfile ?This repository used to be namedmasterfile(and the associated databasemasterfile.ecsv). It has been rename to avoid name conflicts with an existing
Python package calledmasterfile.If you have existing code that uses masterfile, these two commands should
help:sed 's/masterfile/exofile/g' <FILES>sed 's/MasterFile/ExoFile/g' <FILES>where files is a single file or a list of files. To edit the files directlly
(instead of just printing the result of the substitution), add the-iflag to
thesedcommand.The default files have also be renamed toexofile(except the online one). This
can be changed by editing the parameters.