pfmc-assessments / indexwc

Estimate indices of abundance for west coast fish species
2 stars 1 forks source link

fix: only remove boundaries if present in list #34

Open chantelwetzel-noaa opened 2 months ago

chantelwetzel-noaa commented 2 months ago

I was having the issue where I was getting an empty vector for boundaries. Once I dug into it, I found that the boundary check was not robust enough when the boundary was set within a state area. This fix is fairly unsophisticated but addressed the problem. I think this could be done better, but I wanted to open a pull request for you to consider adding this fix or adding a better fix in the main branch.

This pull request should also be considered in tandem with the other open pull request that adds boundaries to the initial call for runsdmTMB(). Having both the functionality to do boundary calculations on existing index estimates or incorporating them in the initial estimation phase provides useful versatility.