1. Installation and Setup

pwv_kpno is designed to be compatible with Python 2.7, and 3.5 through 3.7. The use of other python versions is possible, but not explicitly supported. If you experience installation problems that are not resolved by trying the suggestions below, please raise an issue on GitHub.

1.1. Installation

To install the package, please choose from one of the options below.

Warning

Reinstalling or updating the pwv_kpno package will erase any custom sites that you have added to the previous installation. See the Installing Updates section to update an existing installation.

1.1.2. Using setup.py

If you don’t have pip available on your system, the package source code can be downloaded from GitHub. The package can then be installed by running the following from the project’s root directory:

1
 $ python setup.py install --user

As in the previous method, any missing dependencies in your Python environment should be installed automatically. If you have any issues installing the package, install each dependency from requirements.txt and then try again.

1.2. Installing Updates

Before updating or reinstalling pwv_kpno, it is important to back up any user defined sites that have been added to the local installation. This can be accomplished by running

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 >>> from pwv_kpno.package_settings import settings
 >>>
 >>> sites_to_backup = settings.available_sites
 >>> general_path = './site_backups/{}.ecsv'
 >>> for site in sites_to_backup:
 >>>     settings.set_site(site)
 >>>     out_path = general_path.format(site)
 >>>     settings.export_site_config(out_path)
 >>>
 >>> quit()

This will create a directory site_backups/ containing a .ecsv format config file for each site. The package can then be updated using pip

1
$ pip install pwv_kpno --upgrade

Finally, the backed up config files can be re-added to the package. Letting config_filepaths be a list of the saved config files

1
2
3
4
 >>> from pwv_kpno.package_settings import settings
 >>>
 >>> for config_path in config_filepaths:
 >>>     settings.import_site_config(config_path)

1.3. Package Setup

In order to model the PWV transmission function for a specific site and date, GPS data for that date must be available on your machine. By default, each release of pwv_kpno contains all public SuomiNet data for Kitt Peak National Observatory from 2010 through the end of 2017. It is recommended to update the local SuomiNet data for KPNO after installing or updating the package, and periodically as necessary.

To download any new SuomiNet data use the update_models function:

1
2
>>> from pwv_kpno import pwv_atm
>>> pwv_atm.update_models()

Further documentation on updating the locally available data can be found here.