Downloading packages¶
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, MAORY, 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.
[1]:
import scopesim as sim
from tempfile import TemporaryDirectory
tmpdir = TemporaryDirectory()
sim.rc.__config__["!SIM.file.local_packages_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.
[2]:
sim.list_packages()
[2]:
['Armazones',
'ELT',
'GTC',
'HAWKI',
'HST',
'LFOA',
'LaPalma',
'MAAT',
'MAORY',
'METIS',
'MICADO',
'MICADO_Sci',
'OSIRIS',
'Paranal',
'VLT',
'WFC3',
'test_package']
[3]:
sim.download_packages(["Armazones", "ELT", "MICADO"])
[3]:
['C:\\Users\\Kieran\\AppData\\Local\\Temp\\tmpvf9r8z__\\Armazones.zip',
'C:\\Users\\Kieran\\AppData\\Local\\Temp\\tmpvf9r8z__\\ELT.zip',
'C:\\Users\\Kieran\\AppData\\Local\\Temp\\tmpvf9r8z__\\MICADO.zip']
Development version¶
Use the release="latest"
parameter to get the latest stable development verions of the packages
[4]:
sim.download_packages("test_package", release="latest")
[4]:
['C:\\Users\\Kieran\\AppData\\Local\\Temp\\tmpvf9r8z__\\test_package.zip']
Bleeding-edge versions from GitHub¶
We can also pull the latest verisons of a package from GitHub. This is useful if you are the one writing the package and want to test how it works on a different machine.
The following strings will work:
Latest from a branch:
release="github:<branch-name>"
From a specific tag:
release="github:<tag>"
From a specific commit:
release="github:<super-long-commit-hash>"
[5]:
sim.download_packages("test_package", release="github:dev_master")
INFO - Downloaded: test_package/TC_filter_Ks.dat
INFO - Downloaded: test_package/default.yaml
INFO - Downloaded: test_package/test_detector.yaml
INFO - Downloaded: test_package/test_instrument.yaml
INFO - Downloaded: test_package/test_mode_2.yaml
INFO - Downloaded: test_package/test_package.yaml
INFO - Downloaded: test_package/test_telescope.yaml
INFO - Downloaded: test_package/version.yaml
[5]:
['C:\\Users\\Kieran\\AppData\\Local\\Temp\\tmpvf9r8z__']
[ ]:
sim.download_packages("LFOA", release="github:3c136cd59ceeca551c01c6fa79f87377997f33f9")
INFO - Downloaded: LFOA/CCD-QE.jpg
INFO - Downloaded: LFOA/LFOA.yaml
INFO - Downloaded: LFOA/LFOA_SBIG.yaml
INFO - Downloaded: LFOA/LIST_LFOA_mirrors_static.dat
INFO - Downloaded: LFOA/QE_SBIG.dat
INFO - Downloaded: LFOA/TER_atmosphere.dat
INFO - Downloaded: LFOA/TER_focal_reducer.dat
INFO - Downloaded: LFOA/TER_mirror_aluminium.dat
INFO - Downloaded: LFOA/__init__.py
INFO - Downloaded: LFOA/code/__init__.py
INFO - Downloaded: LFOA/code/sort_NB_filters.py
INFO - Downloaded: LFOA/default.yaml
INFO - Downloaded: LFOA/docs/__init__.py
INFO - Downloaded: LFOA/docs/report_preamble.rst
INFO - Downloaded: LFOA/filters/B.dat
INFO - Downloaded: LFOA/filters/Halpha_narrow.dat
INFO - Downloaded: LFOA/filters/Halpha_wide.dat
INFO - Downloaded: LFOA/filters/Hbeta.dat
INFO - Downloaded: LFOA/filters/I.dat
INFO - Downloaded: LFOA/filters/OIII.dat
INFO - Downloaded: LFOA/filters/R.dat
INFO - Downloaded: LFOA/filters/SII.dat
INFO - Downloaded: LFOA/filters/U.dat
INFO - Downloaded: LFOA/filters/V.dat