Configuration#
Lightkurve
uses Astropy
’s configuration system for configurable parameters.
Users can set their defaults in their configuration file, defaulted at $HOME/.lightkurve/config/lightkurve.cfg
.
Furthermore, they can also change the values at runtime via lightkurve.conf
object.
The remaining specifics can be found in Astropy documentation.
Access configuration values#
Configuration parameters for |
|
Determines the default Lightkurve cache directory name and creates the directory if it doesn't exist. |
|
Determines the package configuration directory name and creates the directory if it doesn't exist. |
Default Cache Directory Migration#
Starting from Lightkurve
version 2.4.0
, the default cache directory is
at ~/.lightkurve/cache
. The data files cached at the legacy location,
~/.lightkurve-cache
, will not be used.
A warning is issued if the legacy ~/.lightkurve-cache
directory still exists.
Migration suggestions for handling various scenarios:
To use the existing data files cached, move all the contents under
~/.lightkurve-cache
to~/.lightkurve/cache
, and remove~/.lightkurve-cache
directory itself.If you need to use older version of
Lightkurve
, e.g., because of the requirements of other packages / applications, you can:Keep the cache at the legacy location
~/.lightkurve-cache
Instruct current
Lightkurve
to use the legacy location. In the user’slightkurve.cfg
, add:[config]
cache_dir = /<your-home-directory>/.lightkurve-cache
The warning will no long appear once a custom
`cache_dir`
is specified.
To suppress the warning for any reason, you can set
warn_legacy_cache_dir
in the user’slightkurve.cfg
.[config]
warn_legacy_cache_dir = False