pfmc-assessments / indexwc

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

fix: only remove boundaries if present in list #34

Closed chantelwetzel-noaa closed 1 month ago

chantelwetzel-noaa commented 5 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.

kellijohnson-NOAA commented 1 month ago

Fixed via #33 with a different commit.