Commit 7664682f authored by GROUAZEL's avatar GROUAZEL

take into account satellite for bubbles ipf png

parent 9f2d7018
......@@ -761,24 +761,24 @@ def getListFromPNGOnHardDriveBlock(pngFolder, satellite='a'):
elementsOnHardDrive = defaultdict(list)
fullPath = defaultdict(list)
key_sat = '(s1'+satellite+'.*)(\.png)'
for root, dirs, files in os.walk(pngFolder):
for file in files:
# remove prefix and extension to have the same baseName
if file.startswith("imaginarycrossspectra") and file.endswith(".png"):
# add the fileNameBase
m = re.search('(s1.*)(\.png)', file)
m = re.search(key_sat, file)
elementsOnHardDrive[dictdbcolnames[satellite]['imaginary_V2']].append(m.group(1))
fullPath[dictdbcolnames[satellite]['imaginary_V2']].append(os.path.join(root, file))
if file.startswith("realcrossspectra") and file.endswith(".png"):
# add the fileNameBase
m = re.search('(s1.*)(\.png)', file)
m = re.search(key_sat, file)
elementsOnHardDrive[dictdbcolnames[satellite]['real_V2']].append(m.group(1))
fullPath[dictdbcolnames[satellite]['real_V2']].append(os.path.join(root, file))
if file.startswith("ocean_swell_spectra") and file.endswith(".png"):
# add the fileNameBase
m = re.search('(s1.*)(\.png)', file)
m = re.search(key_sat, file)
elementsOnHardDrive[dictdbcolnames[satellite]['full_V2']].append(m.group(1))
fullPath[dictdbcolnames[satellite]['full_V2']].append(os.path.join(root, file))
return elementsOnHardDrive, fullPath
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment