Skip to content

Commit d5f3e48

Browse files
author
Ubuntu
committed
set interval and tidy up
1 parent c991afe commit d5f3e48

8 files changed

+4
-432
lines changed

ccdutils/monitoringutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def down_img_mt(img_id, img_collection_list, directory, roi, crs, scale, no_data
614614
with open(fn_meta, 'w') as file:
615615
file.write(json.dumps(meta_dict, indent=4))
616616

617-
def download_images(gdf, down_dir, interval=12):
617+
def download_images(gdf, down_dir, interval=5):
618618
"""
619619
function to download images in ee.ImageCollection
620620
Args

calc_historical_change.ipynb renamed to check_metadata_records.ipynb

Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -46,77 +46,6 @@
4646
" file.write(f\"{cell_id}\")"
4747
]
4848
},
49-
{
50-
"cell_type": "code",
51-
"execution_count": null,
52-
"metadata": {
53-
"execution": {
54-
"iopub.execute_input": "2024-12-09T23:31:06.534345Z",
55-
"iopub.status.busy": "2024-12-09T23:31:06.533855Z",
56-
"iopub.status.idle": "2024-12-09T23:32:48.427823Z",
57-
"shell.execute_reply": "2024-12-09T23:32:48.427067Z"
58-
}
59-
},
60-
"outputs": [
61-
{
62-
"data": {
63-
"text/plain": [
64-
"set()"
65-
]
66-
},
67-
"execution_count": 2,
68-
"metadata": {},
69-
"output_type": "execute_result"
70-
}
71-
],
72-
"source": [
73-
"### perform change detection ###\n",
74-
"cell_directories = glob.glob(\"data/HR6/*\")\n",
75-
"\n",
76-
"# remove directories where data is still to be downloaded\n",
77-
"cells_completed = read_processed_cells(\".CD_completed_cells.log\")\n",
78-
"cells_failed = read_processed_cells(\".CD_failed_cells.log\")\n",
79-
"\n",
80-
"\n",
81-
"#cell_directories = [i for i in cell_directories if i[9:] not in remaining_downloads]\n",
82-
"\n",
83-
"def batch_iterator(iterable, batch_size):\n",
84-
" for i in range(0, len(iterable), batch_size):\n",
85-
" yield iterable[i:i + batch_size]\n",
86-
"\n",
87-
"# def process_cells(folder):\n",
88-
"# img_dir = glob.glob(f\"{folder}/images/*.tif\")\n",
89-
"# for img in img_dir:\n",
90-
"# monitoringutils.convert_image(img)\n",
91-
"\n",
92-
" \n",
93-
"# for dir in tqdm.tqdm(batch_iterator(cell_directories, 50)):\n",
94-
"# process_map(process_cells, dir)\n",
95-
"\n"
96-
]
97-
},
98-
{
99-
"cell_type": "code",
100-
"execution_count": 6,
101-
"metadata": {
102-
"execution": {
103-
"iopub.execute_input": "2024-12-09T23:32:48.431765Z",
104-
"iopub.status.busy": "2024-12-09T23:32:48.430978Z",
105-
"iopub.status.idle": "2024-12-09T23:32:48.434722Z",
106-
"shell.execute_reply": "2024-12-09T23:32:48.434199Z"
107-
}
108-
},
109-
"outputs": [],
110-
"source": [
111-
"def check_images(folder):\n",
112-
" print(folder)\n",
113-
" img_dir = glob.glob(f\"{folder}/images/*.kea\")\n",
114-
" aoi = f\"{folder}/aoi_mask.kea\"\n",
115-
" for img in img_dir:\n",
116-
" monitoringutils.check_input_image(img, aoi) # remove images\n",
117-
" monitoringutils.remove_images_from_metadata(folder)"
118-
]
119-
},
12049
{
12150
"cell_type": "code",
12251
"execution_count": 6,
@@ -937,6 +866,9 @@
937866
" with open(fn, 'w') as file:\n",
938867
" file.write(f\"{cell_id}\")\n",
939868
"\n",
869+
"\n",
870+
"cell_directories = glob.glob('data/HR6/*')\n",
871+
"\n",
940872
"for i in cell_directories:\n",
941873
" check_metadata_record(i)"
942874
]

data/HR5/85bb58c7fffffff/cell_timeseries.csv

Lines changed: 0 additions & 38 deletions
This file was deleted.

data/HR5/85bb58c7fffffff/landcover_timeseries_percentage_change.csv

Lines changed: 0 additions & 38 deletions
This file was deleted.

data/HR5/85bb58c7fffffff/shoreline_timeseries_tidal_correction.csv

Lines changed: 0 additions & 38 deletions
This file was deleted.

data/HR5/85da9213fffffff/cell_timeseries.csv

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)