Skip to content

Commit

Permalink
Add back SetConfiguration.py
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoamaduzzi committed May 28, 2024
1 parent 0bbbfd2 commit a856d81
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 3,638 deletions.
2 changes: 1 addition & 1 deletion ccm
13 changes: 13 additions & 0 deletions config/ConfigPythonAnalysis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"StrDates": ["2022-12-30","2022-12-31","2023-01-01","2022-05-12","2022-11-11","2022-07-01","2022-08-05","2022-01-31","2023-03-18"],
"base_name": "bologna_mdt",
"InputBaseDir":"/home/aamad/Desktop/phd/codice/city-pro/output/bologna_mdt_detailed",
"bounding_box":{
"lat_min":"44.463121",
"lat_max":"44.518165",
"lon_min":"11.287085",
"lon_max":"11.367472"
},
"geojson_file": "/home/aamad/Desktop/phd/codice/city-pro/city-pro-carto.geojson"

}
File renamed without changes.
Empty file added python/PythonWrap.py
Empty file.
27 changes: 27 additions & 0 deletions python/SetRightDirectoriesConfiguration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import json
import os
WORKSPACE = os.environ["WORKSPACE"]
StrDates = ['2022-12-30','2022-12-31','2023-01-01','2022-05-12','2022-11-11','2022-07-01','2022-08-05','2022-01-31','2023-03-18']
BaseName = "bologna_mdt"
Carto = "bologna_mdt_cleaned"

for StrDate in StrDates:
with open(os.path.join(WORKSPACE,"city-pro","bologna_mdt_detailed",StrDate,"config_bologna.json"),"r") as f:
config = json.load(f)
config["file_pnt"] = os.path.join(WORKSPACE,"city-pro","bologna_mdt_detailed","carto",Carto + ".pnt")
config["file_pro"] = os.path.join(WORKSPACE,"city-pro","bologna_mdt_detailed","carto",Carto + ".pro")
config["file_data"] = os.path.join(WORKSPACE,"city-pro","bologna_mdt_detailed",StrDate,BaseName + "_" + StrDate + "_" + StrDate + ".csv")
config["cartout_basename"] = os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed") + "/"
config["file_subnet"] = os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed","weights",BaseName + "_" + StrDate + "_" + StrDate + ".fluxes.sub")
with open(os.path.join(WORKSPACE,"city-pro","bologna_mdt_detailed",StrDate,"config_bologna.json"),"w") as f:
config = json.dump(config,f,indent=2)

if not os.path.exists(os.path.join(WORKSPACE,"city-pro","output")):
os.mkdir(os.path.join(WORKSPACE,"city-pro","output"))
if not os.path.exists(os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed")):
os.mkdir(os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed"))
if not os.path.exists(os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed","weights")):
os.mkdir(os.path.join(WORKSPACE,"city-pro","output","bologna_mdt_detailed","weights"))



3,382 changes: 0 additions & 3,382 deletions python/work_mdt/script/analysis.ipynb

This file was deleted.

10 changes: 0 additions & 10 deletions z_config_analysis/all_subnets.sh

This file was deleted.

63 changes: 0 additions & 63 deletions z_config_analysis/config_aggregated_fundamental_diagram.json

This file was deleted.

170 changes: 0 additions & 170 deletions z_config_analysis/dict_fits.json

This file was deleted.

12 changes: 0 additions & 12 deletions z_config_analysis/launch_all_analysis.sh

This file was deleted.

0 comments on commit a856d81

Please sign in to comment.