Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viz.outcome_map not working when :guided is one of the factors of interest #713

Open
Zapiano opened this issue Mar 11, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Zapiano
Copy link
Collaborator

Zapiano commented Mar 11, 2024

After running scenarios, if I try to plot an outcome_map running:

s_tac = ADRIA.metrics.scenario_total_cover(rs)
mean_s_tac = vec(mean(s_tac, dims=1))
foi = [:dhw_scenario, :wave_scenario, :guided]
tac_om_50 = ADRIA.sensitivity.outcome_map(rs, mean_s_tac, x -> any(x .>= 0.5), foi; S=20)
ADRIA.viz.outcome_map(rs, tac_om_50, foi)

I get the following error:

image

The same doesn't happen if I remove :guided from foi.

Inside ADRIA.jl\ext\AvizExt\viz\sensitivity.jl method outcome_map!, there's the following bit of code

if f_name == :guided
    fv_s = collect(1:length(fv_labels))
else
    fv_s = round.(quantile(f_vals, b_slices), digits=2)
end

That seems to be causing the issue when it gets to the error line (

)

@Zapiano Zapiano added the bug Something isn't working label Mar 11, 2024
@Zapiano
Copy link
Collaborator Author

Zapiano commented Mar 11, 2024

@Rosejoycrocker @ConnectedSystems @DanTanAtAims

I found this while migrating src/analysis/sensitivity.jl's outcome_map to YAXArrays. I won't solve this together with the migration, since it's not related. I'm just explaining because, after the migration, we might want to test all plot functions and this one might break in this particular usecase.

@Rosejoycrocker
Copy link
Collaborator

PR #702 is meant to fix this, although I'll rebase and run tests because the lasat time I updated the YAXArray changes hadn't been merged yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants