Commit 87993c579d440fa14432f859dabcca163282aca9

Authored by Louis Baetens
1 parent dc2a20fd
Exists in master

ENH update the user manual

ALCD_user_manual.pdf
No preview for this file type
PCC/find_chain_directory_paths.py
... ... @@ -6,7 +6,7 @@ import glob
6 6 import json
7 7  
8 8  
9   -def get_all_dates(location, processing_chain='maja', display = True):
  9 +def get_all_dates(location, processing_chain='maja', maja_version = 3, maja_dir_name = '', display = True):
10 10 '''
11 11 Get all available dates for a given location and processing chain
12 12 '''
... ... @@ -24,7 +24,7 @@ def get_all_dates(location, processing_chain='maja', display = True):
24 24 valid_dates = []
25 25 for date_string in all_dates:
26 26 try:
27   - get_processing_dir(location, date_string, processing_chain=processing_chain, display = False)
  27 + get_processing_dir(location, date_string, processing_chain=processing_chain, maja_version = maja_version, maja_dir_name = maja_dir_name, display = False)
28 28 valid_dates.append(date_string)
29 29 except:
30 30 pass
... ... @@ -35,11 +35,11 @@ def get_all_dates(location, processing_chain='maja', display = True):
35 35 return valid_dates
36 36  
37 37  
38   -def check_existing_date(location, date_to_verify, processing_chain='maja', display = True):
  38 +def check_existing_date(location, date_to_verify, processing_chain='maja', maja_version = 3, maja_dir_name = '', display = True):
39 39 '''
40 40 Check if a date is valid for a chain
41 41 '''
42   - all_valid_dates = get_all_dates(location, processing_chain, display = False)
  42 + all_valid_dates = get_all_dates(location, processing_chain, maja_version, maja_dir_name, display = False)
43 43 date_is_valid = date_to_verify in all_valid_dates
44 44 if display:
45 45 print(date_is_valid)
... ... @@ -145,10 +145,13 @@ def get_mask_path(location, date_string, processing_chain='maja', mask_type='clo
145 145  
146 146  
147 147 def main():
148   - location = 'Alta_Floresta_Brazil'
149   - date_string = '20180714'
150   - check_existing_date(location, date_string, processing_chain='maja', display = True)
151   - get_mask_path(location, date_string, processing_chain='maja', mask_type='cloud', display = True)
  148 + location = 'Arles'
  149 + date_string = '20171002'
  150 +
  151 + maja_dir_name = 'MAJA_3_1_S2AS2B_HOT016'
  152 + maja_version = 3
  153 + #~ check_existing_date(location, date_string, processing_chain='maja', maja_version = maja_version, maja_dir_name = maja_dir_name, display = True)
  154 + get_mask_path(location, date_string, processing_chain='maja', mask_type='cloud', maja_version = maja_version, maja_dir_name = maja_dir_name, display = True)
152 155  
153 156 return
154 157  
... ...