open-AIMS / ADRIA_matlab

Repository for the development of ADRIA: Adaptive Dynamic Reef Intervention Algorithms. ADRIA is a multi-criteria decision support tool set particularly useful for informing reef restoration and adaptation interventions.
1 stars 0 forks source link

Site connectivity expects ID order to be the same across all files #130

Open ConnectedSystems opened 2 years ago

ConnectedSystems commented 2 years ago

When loading (and averaging) connectivity data from a set of files, the loading process expects all files to have identical column/row orders.

The RECOM connectivity post-processing script produces data sets sorted by ASCII/alphabetical order, so the expectation that all columns/rows are in the same order should hold true for our immediate use case.

However, for other contexts (e.g., other data sources) this may not. For ADRIA to be robust across different contexts, loading data should check and reorder each individual file as necessary.

Additionally, there may be cases where different connectivity years produced different number of sites (for whatever reason). I suspect in these cases it would be preferable to throw an error and stop.

https://github.com/open-AIMS/ADRIA_repo/blob/Brick_modelling/ADRIAfunctions/siteConnectivity.m

ConnectedSystems commented 2 years ago

Note: connectivity ingestion process has now been adjusted to ingest the mean of each connectivity year when given a directory with sub-folders