We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on 7.1 Loop over multiple datetimes (plots) in https://github.com/jgieseler/solarmach/blob/main/examples/example.ipynb, provide a function that creates an animated gif. The current code in the Notebook is the following:
body_list = ['Earth', 'STEREO A', 'Solar Orbiter', 'PSP', 'BepiColombo'] vsw_list = len(body_list) * [350] for i in range(2,19,1): j = str(i).rjust(2, '0') date = f'2022-6-{j} 12:00:00' filename = f'animate_{date[:-9]}.png' # define filename of output figure sm7 = SolarMACH(date, body_list, vsw_list, coord_sys='Stoneyhurst') sm7.plot(plot_sun_body_line=False, transparent=False, markers='numbers', outfile=filename) import glob files = sorted(glob.glob(filename.replace(f'{i}', '*'))) import imageio images_data = [] for filename in files: data = imageio.v2.imread(filename) images_data.append(data) # write to animated gif; duration (in ms) defines how fast the animation is. imageio.mimwrite('solarmach.gif', images_data, format= '.gif', duration=100, loop=0)
The text was updated successfully, but these errors were encountered:
Ideally, in another step, the call of SolarMACH(date, body_list, vsw_list) should be modified so that date accepts next to a single datetime a list of them, similar to the get_horizons_coord() call in https://docs.sunpy.org/en/stable/generated/gallery/units_and_coordinates/ParkerSolarProbe_trajectory.html This should increase the speed significantly because there will be only one call to JPL Horizon per spacecraft.
SolarMACH(date, body_list, vsw_list)
date
get_horizons_coord()
Sorry, something went wrong.
No branches or pull requests
Based on 7.1 Loop over multiple datetimes (plots) in https://github.com/jgieseler/solarmach/blob/main/examples/example.ipynb, provide a function that creates an animated gif. The current code in the Notebook is the following:
The text was updated successfully, but these errors were encountered: