コード例 #1
0
ファイル: moc_region.py プロジェクト: ggreco77/test_3
    def contour_default(self, _from, _to, _step, skymap=""):
        """Creating & Showing MOC plots (from 10% to 90% in step of 10%) in a folder."""

        import time

        from aladinSAMP import AladinScriptCommands
        aladin = AladinScriptCommands()

        colors = [
            "#ff0000", "#ffaa00 ", "#aaff00", "#00ff00", "#00ffa9", "#00a9ff",
            "#0000ff", "#aa00ff", "#ff00aa"
        ]  # skymap viewer color

        #short_name = skymap
        suffix = skymap[0:]

        aladin.md('MOC' + suffix)  # creating a stack folder
        aladin.remove('MOC' + suffix +
                      '~1')  # removing multiple copy of the folder

        for i, color in zip(np.arange(_from, _to, _step), colors):
            aladin.cmoc((i / 100.0), skymap, 'moc' + str(i / 100.0) + suffix)

            time.sleep(1)  # random break to organize the aladin planes

            plane = 'moc' + str(i / 100.0) + suffix
            aladin.set_color(plane, color)
            aladin.set_moc('moc' + str(i / 100.0) + suffix)
            aladin.mv('moc' + str(i / 100.0) + suffix, 'MOC' + suffix)
コード例 #2
0
ファイル: moon.py プロジェクト: ggreco77/test_3
    def __init__(self):
        """Getting user-values from config_values module."""

        self.user = UserValues()
        self.aladin = AladinScriptCommands()

        self.latitude = self.user.get_latitude()
        self.longitude = self.user.get_longitude()
        self.altitude = self.user.get_altitude()
        self.obs_time = Time(self.user.get_obs_time())

        self.dt = TimeDelta(7200.0, format='sec')

        self.step = 0
        self.end_step = 11
コード例 #3
0
    import pickle

# Python 3 support
try:
    from Tkinter import *
    import tkMessageBox
    import tkFont
except ImportError:
    from tkinter import *
    from tkinter import font, messagebox

import healpy as hp
import numpy as np

from aladinSAMP import AladinScriptCommands
aladin = AladinScriptCommands()

from config_values import UserValues

# global variable: level of trasparency window
user = UserValues()
trasparency = user.get_win_trasparency()


class LoadSkymap(Toplevel):
    """Loading a new skymap."""
    def __init__(self):
        Toplevel.__init__(self, border=8, bg="slate grey")

        self.user = UserValues()