astrodatadownloader: Kepler/K2 files dont have sectors in their filenames
This commit is contained in:
@@ -27,6 +27,7 @@ def parse_manifest(manifest):
|
|||||||
for i,f in enumerate(manifest['Local Path']):
|
for i,f in enumerate(manifest['Local Path']):
|
||||||
file_parts = np.array(np.unique(f.split(sep = '-')))
|
file_parts = np.array(np.unique(f.split(sep = '-')))
|
||||||
sectors = list( map ( lambda x: x[0:2] == 's0', file_parts))
|
sectors = list( map ( lambda x: x[0:2] == 's0', file_parts))
|
||||||
|
if(len(file_parts[sectors]) > 0):
|
||||||
s1 = file_parts[sectors][0]
|
s1 = file_parts[sectors][0]
|
||||||
try:
|
try:
|
||||||
s2 = file_parts[sectors][1]
|
s2 = file_parts[sectors][1]
|
||||||
@@ -36,6 +37,8 @@ def parse_manifest(manifest):
|
|||||||
sector_range.append("%s" % s1)
|
sector_range.append("%s" % s1)
|
||||||
else:
|
else:
|
||||||
sector_range.append("%s-%s" % (s1,s2))
|
sector_range.append("%s-%s" % (s1,s2))
|
||||||
|
else:
|
||||||
|
sector_range.append("-")
|
||||||
path_parts = np.array(f.split(sep = '/'))
|
path_parts = np.array(f.split(sep = '/'))
|
||||||
filenames.append(path_parts[-1])
|
filenames.append(path_parts[-1])
|
||||||
exts.append(path_parts[-1][-8:])
|
exts.append(path_parts[-1][-8:])
|
||||||
|
|||||||
Reference in New Issue
Block a user