Exemple #1
0
def setup_module():
    rc_local_path = rc.__config__["!SIM.file.local_packages_path"]
    if not os.path.exists(rc_local_path):
        os.mkdir(rc_local_path)
        rc.__config__["!SIM.file.local_packages_path"] = os.path.abspath(
            rc_local_path)

    for pkg_name in PKGS:
        if not os.path.isdir(os.path.join(rc_local_path, pkg_name)) and \
                "irdb" not in rc_local_path:
            scopesim.download_package(PKGS[pkg_name])
def download(to_directory=Config.instance().scopesim_working_dir) -> None:
    """
    get scopesim files if not present in current directory
    :return: No
    """
    if not os.path.exists(to_directory):
        os.makedirs(to_directory)
    with work_in(to_directory):
        if not os.path.exists('./MICADO'):
            scopesim.download_package([
                "locations/Armazones", "telescopes/ELT", "instruments/MICADO"
            ])
Exemple #3
0
def profile_hawki_integration():
    PKGS = {
        "Paranal": "locations/Paranal.zip",
        "VLT": "telescopes/VLT.zip",
        "HAWKI": "instruments/HAWKI.zip"
    }
    for pkg_name in PKGS:
        scopesim.download_package(PKGS[pkg_name])

    cmd = scopesim.UserCommands(use_instrument="HAWKI",
                                properties={
                                    "!OBS.dit": 360,
                                    "!OBS.ndit": 10
                                })
    cmd.ignore_effects += ["detector_linearity"]

    opt = scopesim.OpticalTrain(cmd)
    src = scopesim.source.source_templates.star_field(10000, 5, 15, 440)

    # ETC gives 2700 e-/DIT for a 1s DET at airmass=1.2, pwv=2.5
    # background should therefore be ~ 8.300.000
    opt.observe(src)
    hdu = opt.readout()[0]