コード例 #1
0
# Search for transits of bodies with this granularity
search_time_step = 1 * u.day

# Time step used to calculate body positions when a transit is occurring
transit_time_step = 30*u.minute

# Write a file only when the body has an angular separation from the Sun
# less than the maximum below
maximum_angular_separation = 10 * u.deg

# PSP distance limit - the PSP trajectory is calculated when it is less than
# this distance from the Sun
psp_distance_limit = 0.25*u.au

# Only this level and above will be sent to screen.
log.setLevel('WARNING')

# Where to store the data
root = os.path.expanduser('~/hvp/hvorgobjects/output/json')
# root = os.path.expanduser('~/Desktop')

# Supported solar system objects
solar_system_objects = ('sun', 'mercury', 'venus', 'earth', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune')

# Spacecraft whose positions are calculated using the HelioPy/SpicyPy code
spice_spacecraft = ('psp', 'stereo_a', 'stereo_b', 'soho')

# Supported observer locations
observer_names = ['soho', 'stereo_a', 'stereo_b']
tests = ['Test 1', 'Test 2']
supported_observer_names = observer_names + tests
コード例 #2
0
from sunpy.map import Map

from gcs.geometry import gcs_mesh_sunpy, apex_radius
from gcs.utils.helioviewer import get_helioviewer_client
from gcs.utils.widgets import SliderAndTextbox

matplotlib.use('Qt5Agg')

hv = get_helioviewer_client()

straight_vertices, front_vertices, circle_vertices = 10, 10, 20
filename = 'gcs_params.json'
draw_modes = ['off', 'point cloud', 'grid']

# disable sunpy warnings
log.setLevel('ERROR')


def running_difference(a, b):
    return Map(b.data * 1.0 - a.data * 1.0, b.meta)


def load_image(spacecraft: str, detector: str, date: dt.datetime,
               runndiff: bool):
    if spacecraft == 'STA':
        observatory = 'STEREO_A'
        instrument = 'SECCHI'
        if detector not in ['COR1', 'COR2']:
            raise ValueError(
                f'unknown detector {detector} for spacecraft {spacecraft}.')
    elif spacecraft == 'STB':