Downloading packages#

Note: Instrument packages are kept in a separate repository: the Instrument Reference Database (IRDB)

Before simulating anything we need to get the relevant instrument packages. Packages are split into the following categories

  • Locations (e.g. Armazones, LaPalma)

  • Telescopes (e.g. ELT, GTC)

  • Instruments (e.g. MICADO, METIS, MORFEO, OSIRIS, MAAT)

We need to amke sure we have all the packages required to built the optical system. E.g. observing with MICADO is useless without including the ELT.

import scopesim as sim

from tempfile import TemporaryDirectory
tmpdir = TemporaryDirectory()
sim.set_inst_pkgs_path(tmpdir.name)

scopesim.download_packages()#

Stable packages#

The simplest way is to simply get the latest stable versions of the packages by calling their names.

Call list_packages() or see the IRDB for names.

sim.list_packages()
['HAWKI',
 'MAORY',
 'METIS',
 'MICADO',
 'MICADO_Sci',
 'MORFEO',
 'MOSAIC',
 'NIRCam',
 'OSIRIS',
 'WFC3',
 'test_package',
 'Armazones',
 'LaPalma',
 'Paranal',
 'ELT',
 'GTC',
 'HST',
 'JWST',
 'LFOA',
 'VLT',
 'ViennaLT']
sim.download_packages(["Armazones", "ELT", "MICADO"])
astar.scopesim.server.database - Gathering information from server ...
astar.scopesim.server.database - Connection successful, starting download ...
[PosixPath('/tmp/tmpalo2cb9q/Armazones.zip'),
 PosixPath('/tmp/tmpalo2cb9q/ELT.zip'),
 PosixPath('/tmp/tmpalo2cb9q/MICADO.zip')]

Development version#

Use the release="latest" parameter to get the latest stable development verions of the packages

sim.download_packages("test_package", release="latest")
astar.scopesim.server.database - Gathering information from server ...
astar.scopesim.server.database - Connection successful, starting download ...
[PosixPath('/tmp/tmpalo2cb9q/test_package.zip')]