Skip to content
New issue

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

Mute download progress bars in helioviewer #3259

Closed
wjwainwright opened this issue Jul 3, 2019 · 4 comments
Closed

Mute download progress bars in helioviewer #3259

wjwainwright opened this issue Jul 3, 2019 · 4 comments
Labels
Effort Low Requires a small time investment Feature Request New feature wanted! net Affects the net submodule Package Novice Requires little knowledge of the internal structure of SunPy Priority Medium Non-urgent action required

Comments

@wjwainwright
Copy link

Description

Is it possible to add a boolean to the download_png and download_jp2 methods of helioviewer.py? When downloading data in bulk, it is unnecessary to have the console filled up with progress bars for each individual file.

Additional context

I wrote a script that downloads AIA images of multiple wavelengths for the purpose of making movies of the sun. I wrote the script in 0.9.x but noticed this change in 1.0.x.

@Cadair
Copy link
Member

Cadair commented Jul 3, 2019

👋 @wjw3336

Thanks for opening the issue, this seems like a sensible addition, also the ability to batch helioviewer downloads would be interesting.

I would suggest to anyone who wants to take a stab at doing this, that _get_file takes a progress keyword argument and then the addition of this keyword argument should be propagated up to the functions which call _get_file.

@Cadair Cadair added Feature Request New feature wanted! net Affects the net submodule Effort Low Requires a small time investment Package Novice Requires little knowledge of the internal structure of SunPy Priority Medium Non-urgent action required labels Jul 3, 2019
@Cadair Cadair changed the title Mute download progress printouts Mute download progress bars in helioviewer Jul 3, 2019
@wjwainwright
Copy link
Author

wjwainwright commented Jul 3, 2019

also the ability to batch helioviewer downloads would be interesting.

Adding a batch downloader would be tricky because over long periods of time the object travels out of frame from cropped windows. I wrote my script such that it adds to the x0 and y0 values depending on the latitude of y0 and the differential rotation in x0 based on latitude. I can share my tracking code if it's something you would be interested in adding. It's not elegant by any stretch but it worked to track an active region across a full week of AIA observations from one side of the sun to the other.

Edit: Here's the link https://github.com/wjwainwright/helio_mkmovie

@Cubostar
Copy link
Contributor

Cubostar commented Jul 17, 2019

I can work on this! However, I'm not quite sure what the task is. Do we just need a boolean that says whether the download has completed or not?

@vn-ki
Copy link
Member

vn-ki commented Jul 18, 2019

@Cubostar The task is to add a boolean to disable the progress bars which are shown during the download.

I would suggest to anyone who wants to take a stab at doing this, that _get_file takes a progress keyword argument and then the addition of this keyword argument should be propagated up to the functions which call _get_file.

So you will have to add a boolean argument progress to

def _get_file(self, params, directory=None, overwrite=False):

And this argument should be passed down to parfive.

The argument should also be introduced in functions which use _get_file, for example here

return self._get_file(params, directory=directory, overwrite=overwrite)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort Low Requires a small time investment Feature Request New feature wanted! net Affects the net submodule Package Novice Requires little knowledge of the internal structure of SunPy Priority Medium Non-urgent action required
Projects
None yet
Development

No branches or pull requests

4 participants