mangonetwork / mangopy

This repository contains code for processing all-sky images generated by the Mid-latitude All-sky-imager Network for Geophysical Observations (MANGO), a project funded by the National Science Foundation.
GNU General Public License v3.0
7 stars 3 forks source link

Modify fetching utility to retrieve png files #5

Open ljlamarche opened 5 years ago

ljlamarche commented 5 years ago

Although mangopy is designed to use the full night hdf5 files, some users may want to work with the more traditional png image files. Should we add functionality to fetch all the png image files for a particular night?

astib commented 5 years ago

That is a good idea.

On 5/10/19 9:52 AM, Leslie Lamarche wrote:

Although mangopy is designed to use the full night hdf5 files, some users may want to work with the more traditional png image files. Should we add functionality to fetch all the png image files for a particular night?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fastib%2FMANGO%2Fissues%2F5&data=01%7C01%7Casti.bhatt%40sri.com%7Cc19299b8a55b47cbac3208d6d567e412%7C40779d3379c44626b8bf140c4d5e9075%7C1&sdata=zBEWpwkAnZ19Km4d0uDs3o2kJX2qIoUp8KAXGR8SWWE%3D&reserved=0, or mute the thread https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEGXOOZCRETNW56W4W6OFEDPUWR43ANCNFSM4HMEV2CA&data=01%7C01%7Casti.bhatt%40sri.com%7Cc19299b8a55b47cbac3208d6d567e412%7C40779d3379c44626b8bf140c4d5e9075%7C1&sdata=0r8CgLLWUM0bPhmYB1GcdBv4wTQhl%2BqMEbTRP75Lqaw%3D&reserved=0.

-- Asti Bhatt Center for Geospace Studies SRI International 333 Ravenswood Ave Menlo Park, CA 94025 Phone # +1-650-859-3424

ljlamarche commented 5 years ago

I can look into adding this for the second release. I think we can use a very similar protocol as our current data fetching if there's a way to get a list of file names. ftplib (https://docs.python.org/3/library/ftplib.html) may be a good option to consider.

from ftplib import FTP
ftp = FTP('isr.sri.com')
ftp.login()
ftp.nlst('pub/earthcube/provider/asti/MANGOProcessed/Rainwater Observatory/Oct0116')