Hi,
I want to save the output of my Codim-2 continuation as a csv or txt file.
codim2_a2 = continuation(br, 2, (@optic _.a2),
ContinuationPar(opts_br, p_min = 0.0, p_max = 1000.0, dsmin = 1e-6, max_steps = 1e8, tol_stability = 1e-12);
normC = norminf,
bothside = true,
detect_codim2_bifurcation = 2,)
I’ve tried the following:
df2 = DataFrame(
a1 = codim2_a2.param.a1,
a2 = codim2_a2.param.a2,
x = codim2_a2.branch.x,
y = codim2_a2.branch.y,
z = codim2_a2.branch.z
)
# Save with a marker row
marker_row = DataFrame(a1 = [missing], a2 = [missing], x = ["--- codim-2 continuation a2(bp[2]) ---"], y = [missing], z = [missing])
CSV.write("Outputs/Codim2_a1_a2.csv", marker_row; append=true)
CSV.write("Outputs/Codim2_a1_a2.csv", df2; append=true)
Which generates the following error
type Array has no field a1
Stacktrace:
[1] getproperty(x::Vector{Float64}, f::Symbol)
@ Base ./Base.jl:49
[2] top-level scope
@ In[68]:1
If only saving the data for parameter a1 and the system variables (as shown below) the file saves correctly but I also need the data for parameter a2
df2 = DataFrame(a1 = codim2_a2.branch.param,
x = codim2_a2.branch.x,
y = codim2_a2.branch.y,
z = codim2_a2.branch.z)
# Save with a marker row
marker_row = DataFrame(a1 = [missing], a2 = [missing], x = ["--- codim-2 continuation a2(bp[2]) ---"], y = [missing], z = [missing])
CSV.write("Outputs/Codim2_a1_a2_test.csv", marker_row; append=true)
CSV.write("Outputs/Codim2_a1_a2_test.csv", df2; append=true)
Thank you.