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

`strongpred` all NaN #116

Open ConnectedSystems opened 2 years ago

ConnectedSystems commented 2 years ago

As in title, the strongpred variable in siteConnectivity() returns a matrix that is all NaN.

This is caused by this line:

https://github.com/open-AIMS/ADRIA_repo/blob/9712fb3f07aa304be54bf0615e59607f80965fe6/ADRIAfunctions/siteConnectivity.m#L145

where eid is an empty vector.

Background in case this is relevant to the current issue:

As discussed over email, I ran into an issue where reading in CSV data would result in some numeric columns being interpreted as strings rather than float/double.

This was resolved by setting the 'TreatAsEmpty' option to "NA", and then setting NaN values in the table to 0 after the data is read in.

This may or may not have led to this issue.

ConnectedSystems commented 2 years ago

Hey @veroniquelago

When you start looking into this, please see this section of code in the Brick_modelling branch:

https://github.com/open-AIMS/ADRIA_repo/blob/9712fb3f07aa304be54bf0615e59607f80965fe6/ADRIAfunctions/siteConnectivity.m#L144

ConnectedSystems commented 2 years ago

Hi @veroniquelago

I think this issue was caused by problematic connectivity data and is resolved by the new post-processing functions.

When you have the time, could you please check the most recent code (in the Brick_modelling branch) just so another pair of eyes have looked at it?